TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

AWS Tagging Best Practices: Using Terraform and CloudFormation to Enforce Tags

63 pointsby toeknee123over 4 years ago

6 comments

ldoughtyover 4 years ago
I really dislike that the solutions for AWS tag shortcomings is custom code.<p>I&#x27;m a big AWS fan and heavy user for 5 years now, but it seems silly to me that you need to write a custom wrapper (e.g. force the creation through a managed script&#x2F;template like Terraform&#x2F;Ansible&#x2F;CF)... Or write reactionary cloud trail policies to handle a situation where someone launches an EC2 instance without providing a specific tag.<p>The fact IAM policies still can&#x27;t deny requests missing a tag, or deny requests by tag-value condition seems silly to me... Or one step further: allowing some auto-populated tags like what principle was responsible for making the instance in the first place.
评论 #24354553 未加载
评论 #24360421 未加载
评论 #24354550 未加载
mcintyre1994over 4 years ago
Something that&#x27;s pretty nice in AWS CDK is that tagging is recursive - so if you add a tag to eg. a top-level ECS service object then the tags are applied to all of its children automatically. <a href="https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;cdk&#x2F;latest&#x2F;guide&#x2F;tagging.html" rel="nofollow">https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;cdk&#x2F;latest&#x2F;guide&#x2F;tagging.html</a>
评论 #24355809 未加载
kapilvtover 4 years ago
This is one of the bread butter use cases on the opensource cloud custodian project (auto tagging, tag enforcement workflows, retro-active tagging from cloudtrail, etc). <a href="https:&#x2F;&#x2F;cloudcustodian.io" rel="nofollow">https:&#x2F;&#x2F;cloudcustodian.io</a> (now a cncf sandbox project).
评论 #24354946 未加载
tthayerover 4 years ago
We use cloudposse&#x27;s label terraform module for everything. It works really well and it lets you use common values for everything. Paired with terragrunt it removes most of the pain of tagging for us.
yonixwover 4 years ago
Tags are not supported for some VPC components (on creation). In that sense, Azure Resource Group and Google Projects is way better for organising and project based permissions.<p>Source: <a href="https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;AWSEC2&#x2F;latest&#x2F;UserGuide&#x2F;Using_Tags.html#tag-ec2-resources-table" rel="nofollow">https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;AWSEC2&#x2F;latest&#x2F;UserGuide&#x2F;Using_Ta...</a>
评论 #24355827 未加载
nprateemover 4 years ago
Use a tag policy and you can use whatever tool you want