I'm easily able to pass parameters to a Nested Cloudformation Stack using AWS::CloudFormation::Stack, including referenced values:
"MyNestedStack" : {
"Type" : "AWS::CloudFormation::Stack",
"Condition" : "MyCondition",
"Properties" : {
"TemplateURL" : {
"Fn::Join" : ["", ["http://ift.tt/1re7YGr", {
"Ref" : "S3BucketLocation"
}, "/MyNestedStack.template"]]
},
"Parameters": {
"MyVPC" : {
"Ref" : "VPC"
},
"MySubnet" : {
"Ref" : "ManagementSubnet"
},
"MySubnetAZ" : {
"Fn::GetAtt" : [ "ManagementSubnet", "AvailabilityZone" ]
}
"InstanceType" : "m3.large",
"KeyName" : "MyKey",
}
}
}
But I'm not able to find any documentation how to pass the Stack tags applied to the parent stack down to the child (nested) stack.
The original stack was called by:
#Create Stack
aws cloudformation create-stack --parameters ${parms} --tags Key='Environment Name',Value=${name} Key=Name,Value=${env} --stack-name ${env} --template-url ${url}
The Environment name and Name tags get applied to resources in the original stack, such as instances, but not to resources in the nested stack nor the nested stack itself.
Aucun commentaire:
Enregistrer un commentaire