hashicorp / packer-plugin-amazon

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

iam: attach tags to instance role and profile #323

Closed Glyphack closed 1 year ago

Glyphack commented 1 year ago

RunTags value is used to set tags for resources created by packer except for Iam role and profile. This PR adds the tags when creating these resources. Resolves #322

This will also address part of #286

Glyphack commented 1 year ago

I still have to write tests for this but wanted to get some initial thoughts. To me it seems like we can use generics on the TagMap type to convert it to AWS SDK types. What do you think?

Glyphack commented 1 year ago

Hi @lbajolet-hashicorp,

You're right about the tests. My initial thought was that we can run a check for the building phase. Now that I read the acceptance tests code I realized the Checks are only for the post build step. Adding a test for this requires adding a new functionality to tests which I prefer to stick with your suggestion. Let's continue with the current state.

lbajolet-hashicorp commented 1 year ago

Sounds good @Glyphack, I'll merge this now and move on to review your other PRs, thanks!