Getting region from AWS profile

7 views
Skip to first unread message

John Mc Quillan

unread,
Mar 7, 2018, 12:07:27 PM3/7/18
to Packer
Does anyone know how to get the region from the AWS profile and use it to set a user variable so that it can be passed through to provisioners.

Rickard von Essen

unread,
Mar 7, 2018, 1:33:41 PM3/7/18
to packe...@googlegroups.com
You can either do:

A) packer build -var region=$(aws configure --profile <profile> get region) template.json

Or (IMHO better)


On 7 March 2018 at 18:07, John Mc Quillan <john.m...@gmail.com> wrote:
Does anyone know how to get the region from the AWS profile and use it to set a user variable so that it can be passed through to provisioners.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/06f531e6-67ba-44c1-b0db-4594564fa1da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages