Last active
October 27, 2020 15:40
-
-
Save sustacek/987a85e51387849d7debe676ed7d19ff to your computer and use it in GitHub Desktop.
The snippet of a Cloud Formation template, which supports input of boolean parameter and using it for a resource with Boolean property.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"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