hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
69 stars 104 forks source link

Feature Request: AWS tag resources on creation #488

Open dlouzan opened 2 weeks ago

dlouzan commented 2 weeks ago

Community Note

Please search the existing issues for relevant feature requests, and use the reaction feature (https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to add upvotes to pre-existing requests.

Description

This is a general re-request of feature https://github.com/hashicorp/packer/issues/4746. Basically support being able to provide tags to AWS resources on creation. Since the previous issue is blocked, it can't be commented on, nor upvoted.

This functionality would allow a much tighter set of IAM permissions.

Ansible 10 just recently added this capability: https://github.com/ansible-community/ansible-build-data/blob/main/10/CHANGELOG-v10.md#amazonaws. Having it on packer too would be really helpful.

Thanks!

lbajolet-hashicorp commented 1 week ago

Hi @dlouzan,

Since this is an AWS request, it's better served by the packer-plugin-amazon repo, so I'll transfer your issue over there.

That being said, Packer supports tagging created AMIs, both through the tags argument, and through the run_tags (plus other attributes depending what you're trying to tag), could you provide an example of what you tried that didn't work?

Thanks

lorengordon commented 1 week ago

The referenced issue https://github.com/hashicorp/packer/issues/4746 was actually implemented, not just closed. See PR https://github.com/hashicorp/packer/pull/5196.