aws-cloudformation / aws-cloudformation/aws-cloudformation-resource-providers-awsutilities-commandrunner
New functionality: support tagging
- Dominant language
- Java
- Stars
- 81
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-awsutilities-commandrunner/blob/master/awsutility-cloudformation-commandrunner.json), fetch the tag list and programatically add tag parameters to [BaseTemplate.json](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-awsutilities-commandrunner/blob/master/src/main/resources/BaseTemplate.json) in [CreateHandler.java ](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-awsutilities-commandrunner/blob/master/src/main/java/software/awsutility/cloudformation/commandrunner/CreateHandler.java).
Contributor guide
Research direction
Start with awsutility-cloudformation-commandrunner.json, then read BaseTemplate.json and CreateHandler.java to trace configuration and template generation. Verify the completed change supports tag input and creates the EC2 instance through a LaunchTemplate so tag-enforcing SCPs do not block creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100