Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The snippet of a Cloud Formation template, which supports input of boolean parameter and using it for a resource with Boolean property.
{
...
"Parameters": {
"DbRdsMultiAZ": {
"Type": "String",
"Description": "Specifies if the RDS instance is deployed in multiple Availability Zones.",
"AllowedValues": [
"yes",
"no"
],
"Default": "no"
}
},
"Conditions" : {
"DbRdsMultiAZCondition" : {"Fn::Equals" : [{"Ref" : "DbRdsMultiAZ"}, "yes"]}
},
"Resources": {
"DbRdsLiferayInstance": {
"Type": "AWS::RDS::DBInstance",
"Properties": {
...
"MultiAZ": { "Fn::If" : [
"DbRdsMultiAZCondition",
true,
false
]}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment