I have zookeeper connect as ip1:port1,ip2:port2,ip3:port3 and I want to use this in my userdata How can i do it?
"ZooKeeperConnect": {
"Type": "String",
"Description": "list of IP or CNAME's for the associated zookeeper ensemble",
"AllowedPattern": "([1-9][0-9]?|[1-2][0-9]{2})(\\.([1-9][0-9]?|[1-2][0-9]{2})){3}(:[1-9][0-9]{1,4})?(,([1-9][0-9]?|[1-2][0-9]{2})(\\.([1-9][0-9]?|[1-2][0-9]{2})){3}(:[1-9][0-9]{1,4})?)*"
}
"UserData": {
"Fn::Base64": {
"Fn::Join": [
"",
[
"#!/bin/bash \n",
"echo Cache proxy vars... \n",
I want to use ZooKeeperConnect values in my userdata
You can reference the ZooKeeperConnect
parameter or any other parameter in your userdata section:
"UserData" : {
"Fn::Base64" : {
"Fn::Join" : [ ",", [
{ "Ref" : "MyValue" },
{ "Ref" : "MyName" },
"Hello World" ] ]
}
}
The above snippet was taken from http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-general.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With