Reputation: 4177
I'm trying to understand the behavior of CloudFormation with respect to applying tags to the resources it creates.
As per their documentation - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
In addition to any tags you define, AWS CloudFormation automatically creates the following stack-level tags with the prefix aws::
aws:cloudformation:logical-id
aws:cloudformation:stack-id
aws:cloudformation:stack-name
I created a DynamoDB table from CloudFormation and I visited the DynamoDB console and selected the tags tab and couldn't find any specific tag being added. I also did not find the aws:cloudformation:logical:id tag being added.
I then tried to create a S3 bucket using CloudFormation. That seems to work and I was able to visit the S3 console and find the aws:cloudformation:logical-id tag for the S3 bucket.
Is this some kind of inconsistency? Is there any specific documentation I can follow to find the list of AWS resources to which CloudFormation applies the tags prefixed with aws: as mentioned in the documentation?
Any help would be appreciated. Thanks!
Upvotes: 3
Views: 2977
Reputation: 41
I've had to recently contact AWS Enterprise support about this
Commonly requested services that aren't receiving tags from cloud formation include
There is an internal feature request open, however their suggested action was to just manually tag the resources.
Upvotes: 4
Reputation: 317
aws cloudformation create-stack --stack-name Name-of-your-stack --template-body file://your_template.json --tags Key=Name,Value=Your_Tag_Value --profile default --region region --capabilities CAPABILITY_NAMED_IAM
--capabilities CAPABILITY_NAMED_IAM
if you do not have IAM resources in your CFT.Upvotes: 0