Amplify-cli: Tag Support

Created on 28 Oct 2018  路  16Comments  路  Source: aws-amplify/amplify-cli

please add tag support to AWS Amplify cli, so that all resources can be tagged automatically at creation time with the tags you specify via a --tags argument

cloudformation feature-request

Most helpful comment

I can work on drafting an RFC. From what I can tell from our use cases, the process would be the following:

  1. When running amplify init prompt the user to enter their set of tags that would be used to _all_(?) created resources.

  2. If the resource allows tagging (not all resources do), then update the necessary cloudformation templates to include the desired tags. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html

Possibly 3: Allow the user to edit/add tags when running amplify configure.

It's been a while since this issue was first opened and the fact that it hasn't gone stale means there is continued interest. Looking forward to all of your feedback to make sure we can get a more directed PR up soon.

All 16 comments

If anyone has insight into how one would approach raising a PR against this, perhaps it would help drive development? For context, my company allows us devs to have a sandbox AWS account so long as the resources are tagged, thus having to figure out what resources were made or update a cloudformation file after the fact isn't the best DX.

@mtliendo We ran into the same issues. We use aws-nuke to keep the costs low on testing.

Please make this possible!

@tzdesign Oh, I've never used that package before. It's like rimraf for aws hehe. My solution has been to keep a notepad of the repos I create that use amplify and when I feel they go idle run amplify delete.

In practice are there advantages that aws-nuke provides over that command?

@mtliendo We are using a lot of Cloudformation and serveral team members are deploying with amplify, serverless, etc. It's impossible to keep track on each one of these things without tags.

It has no advantages except that it implements a workflow for testing and destruct stuff which is not in production.

At the moment it's okay to nuke all inside the sandbox sub account, but in the end when it comes to cost consumption you will struggle without tags as well.

It's a feature of aws cloud formation, why not supporting it here.

Please, I do need this.

@kaustavghosh06 it would be awesome if this was added, right now we have environments that haven't been committed to amplify/team-provider.json (e.g. abandoned in a branch) that we'd like to periodically clean up.

We also could use this. Currently we have to go to the resources after they are created and manually add them or we add the tags to the cloudformation. It is a bit of an annoyance :)

I can work on drafting an RFC. From what I can tell from our use cases, the process would be the following:

  1. When running amplify init prompt the user to enter their set of tags that would be used to _all_(?) created resources.

  2. If the resource allows tagging (not all resources do), then update the necessary cloudformation templates to include the desired tags. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html

Possibly 3: Allow the user to edit/add tags when running amplify configure.

It's been a while since this issue was first opened and the fact that it hasn't gone stale means there is continued interest. Looking forward to all of your feedback to make sure we can get a more directed PR up soon.

It would be great if we could apply tags to the root stack, and have them propagated to the nested stacks as well. That would allow CloudFormation to do it's thing and handle tagging all taggable resources automatically.

Any update on when this might be possible? I am just starting to use Amplify and my boss asked that all resources created by Amplify be tagged so he can manage the cost better.

Is there a workaround until Amplify does support this directly? Is there a way to sift through the files in the amplify folder of a project to collect all of the ARNs for the resources created? Could the aws cli be used to assign tags then?

Need this support in our org as well

@mtliendo is there enough detail on this now that we could start working on the PR?

@hotgazpacho im not sure I understand. the docs say that tagging at the root level will automatically propagate.

__All stack-level tags, including automatically created tags, are propagated to resources that AWS CloudFormation supports. Currently, tags are not propagated to Amazon EBS volumes that are created from block device mappings__

Are you saying that wouldn鈥檛 include nested stacks?

Hi everyone! We've put this into an RFC! I'd love to hear all of your feedback on this. https://github.com/aws-amplify/amplify-cli/issues/4607

Hi all - Tag support is now available! https://docs.amplify.aws/cli/usage/tags

Awesome work! So glad to have this and it's been already used in some of our greenfield projects!

Was this page helpful?
0 / 5 - 0 ratings