Open ghost opened 3 years ago
I followed the plugin download steps as mentioned in https://github.com/hashicorp/packer-plugin-amazon/pull/96. Found that when the image is built, it copies tags properly to the destination region within the same account, but if I give different account, it does copy the image but tags are not copied
1) Works fine with below where image/tags are copied properly source-account1-region: us-east-1 destination-account1-region: eu-west-2
2) Doesn't work with below. Image is copied but not the source-tags source-account1-region: us-east-1 destination-account2-region: eu-west-2
Hi @veereshh-juniper thanks testing out the latest release and for sharing the details on how it worked out. Looking at the documentation for Sharing AMI across accounts I don't think there is support for tags being copied across accounts.
Do you know if this is supported if you copy an AMI via the console of cli?
To quote the documentation
There is no limit to the number of AWS accounts with which an AMI can be shared. User-defined tags that you
attach to a shared AMI are available only to your AWS account and not to the other accounts that the AMI is shared with.
I checked through console copying to different account/region and yes source-tags are not being copied to different accounts during AMI copy operation. As of now workaround would be to get the source-tags from the AMI and then use the aws ec create-tags to update on the destination AMI (during packer post-processor phase)
Looks like this will finally be fixed soon! PR https://github.com/hashicorp/packer-plugin-amazon/pull/327 implements copying of tags during AMI copy. Released in v1.2.2 of the plugin. Now just waiting for packer to update the plugin.
Duplicate issue: https://github.com/hashicorp/packer-plugin-amazon/issues/295
This issue was originally opened by @RixhersAjazi as hashicorp/packer#10132. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
When I set
tags
onamazon-ebs
builder I see the tags being applied in packer log output during the running of packer. However I do not see the final tag in AWS console when I go and check on my AMI's.Reproduction Steps
Packer version
Packer build output
Notice there are lines saying:
Operating system and Environment details
MacOS Catalina - 10.15.7
Log Fragments and crash.log files