Closed BohdanPetryshyn closed 1 year ago
Hey @DrFunk-n-stein! I covered all the resources Basti creates during the init
command execution. However, I didn't manage to find a good example of an SCP that would enforce tags on all the resources in the AWS account. Is there a chance that you have an SCP definition to share so that I can test the solution?
I published basti@1.4.0-alpha.1
so that you could test basti init --tag <tag=value>
on some AWS accounts if you had a chance :)
Proposed Changes
This PR makes the
basti init
command tag all the created resources if instructed with any of the following CLI arguments:--tag
- specifies a single tag as a name/value pair separated by an equal sign. Can be used multiple times--tags-file
- specifies a JSON file that can contain multiple tags as key-value pairs of the root object.If the
--tag
option is used multiple times with the same tag name, the latter usage will override the previous ones. The same applies to--tags-file
. Tags specified with the--tag
option will always override tags from files.An example of a tags file:
Example of the command usage:
Related Issue
50
Checklist
npm run test
).