Add some default tags to the AWS resources for the EKS cluster. #399
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds some of the tags from the tagging guide from the previous ECS project. I've omitted
chargeable_entity
andenvironment
for now because those might need a bit of a rethink in light of the switch to Kubernetes. (For example is the "environment" the same thing from an infrastructure perspective as it is from the cluster-user/developer/application perspective?)The idea here is really just to define a place to put the common tags so that we continue to set them in the right way. Using provider default tags (relatively new feature) is now the cleanest way to do this.
Thanks to @kerin for the suggestion of using provider default tags.
One caveat is that the default tags aren't propagated to ASGs, so this doesn't currently tag the node pool ASG. Passing the same set of tags to the
eks
module in order to tag the ASG doesn't work, because the TF provider unhelpfully forbids individual resources from overriding provider-specific tags because of a design limitation of TF. (See issue 19204 in terraform-provider-aws.)Trello card
Tested:
tf apply -var-file=../variables/test/common.tfvars
TF plan in the test account: