aws-cloudformation / aws-cloudformation-resource-providers-awsutilities-commandrunner

Apache License 2.0
81 stars 21 forks source link

New functionality: support tagging #35

Open maslick opened 2 years ago

maslick commented 2 years ago

Some organisations leverage Service Control Policies SCPs (e.g. for cost control) that enforce putting proper tags on your resources. In such scenarios CommandRunner won't be able to create an EC2 instance.

For this in addition to AWS::EC2::Instance we must use AWS::EC2::LaunchTemplate because Cloudformation puts tags on an EC2 instance in 2 API calls, whereas if you launch your EC2 based on a LaunchTemplate there will be 1 API call.

So we can add another parameter to the configuration file, fetch the tag list and programatically add tag parameters to BaseTemplate.json in CreateHandler.java .

shantgup commented 2 years ago

Thank you for the feedback @maslick, you are right this would cause an issue for organizations using SCP policies to enforce tagging. I will mark this as an FR as well.

Your activity on this repo is much appreciated, thank you. 🥇

pl-ajessop commented 1 year ago

Hi, this would be a much appreciated feature - we use SCPs and can't use enforcement for this reason.

shantgup commented 1 year ago

Thank you @pl-ajessop, I will include this feature in the next minor release.