cfn-include
cfn-include copied to clipboard
Support objects in FN::Map
I would really love the following to be possible: (syntax is just a proposal)
"Fn::Map": [
[
{"zone":"a","net":"0"},
{"zone":"b","net":"1"},
{"zone":"c","net":"2"}
],
"az",
{
"Subnet${az.zone}": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"VpcId": {
"Ref": "VPC"
},
"AvailabilityZone": {
"Fn::Join": [
"",
[
{
"Ref": "AWS::Region"
},
"${az.zone}"
]
]
},
"CidrBlock": "192.168.${az.net}.0/24",
"MapPublicIpOnLaunch": true
}
}
}
]
@monken Do you think this is possible?
You should be able to do this today with referencing a structure in the Mappings
object.
Define your CIDR ranges in a mapping table and then reference that using something like "CidrBlock": {"Fn::FindInMap": ["CIDRMap", "az"]},
But yeah, being able to reference values in the object that is being passed would be nice.