Open maslick opened 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. 🥇
Hi, this would be a much appreciated feature - we use SCPs and can't use enforcement for this reason.
Thank you @pl-ajessop, I will include this feature in the next minor release.
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 useAWS::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 .