Prevalidate AMI-name in a specific account.

18 views
Skip to first unread message

Akhilesh Verma

unread,
Mar 9, 2020, 3:21:57 PM3/9/20
to Packer
Hi,
Can we prevalidate an ami-name in a specific account? right now I am facing issues when I create the same name ami with two different accounts.
Any help would be appreciated.

Thanks,
Akhilesh Verma

AndyB

unread,
Mar 9, 2020, 7:29:34 PM3/9/20
to packe...@googlegroups.com
Why not Create unique ami name that uses date/time stamp?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/339187b9-d104-44d8-9d35-dc84a7753cf9%40googlegroups.com.

Akhilesh Verma

unread,
Mar 10, 2020, 12:44:15 AM3/10/20
to Packer
I have a use case to create same ami name with different account, so that another application form a ami name in given format and search it in a account.
-Akhilesh 

John Roh

unread,
Mar 10, 2020, 12:59:24 AM3/10/20
to packe...@googlegroups.com
are you tagging your AMI? that way, even though ami name is different, you can still search by tagging with the consistent name.
Or you can just share AMI if you don't need to build each time. When you share an AMI with different accounts, AMI name doesn't need to be changed and also you have the same consistent AMI id. 
But when you share an AMI with different account, you need to provide the tagging.

John.

Akhilesh Verma

unread,
Mar 10, 2020, 4:08:18 PM3/10/20
to Packer
Thanks,
I have modified code to achieve same, and for atleast my use case, it is working fine.
https://github.com/hashicorp/packer/pull/8864/files

Thanks & Regards,
Akhilesh

Reply all
Reply to author
Forward
0 new messages