Hello Alex,
I think you require:
variables block, where you evaluate env into template variables
and inside the builder block you can use this packer variables
an example is better:
https://github.com/hashicorp/atlas-examples/blob/master/metamon/ops/site.json#L2-L10
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"ssh_username": "ubuntu"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
Thanks
Alvaro.
> --
> 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/f0137e81-3d41-4a14-a8d2-b3e34cb4950d%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.