Thanks, that did the trick.
On Saturday, February 25, 2017 at 11:27:14 AM UTC-5, Alvaro Miranda
Aguilera wrote:
>
> hello
>
> not sure what is your host os, but in bash for linux/osx the single quote
> will avoid the variable expansion
>
> try
> packer build -var "do_api_token=${DO_API_TOKEN}" example.json
>
> On Sat, Feb 25, 2017 at 5:12 PM, Michael Beigelmacher <
> [email protected] <javascript:>> wrote:
>
>> I’m going the tutorial on Packer here about parallel builds
>> <https://www.packer.io/intro/getting-started/parallel-builds.html> and
>> the build for a DigitalOcean image fails. First, packer validate
>> example.json fails with:
>>
>> Template validation failed. Errors are shown below.
>>
>> Errors validating build 'digitalocean'. 1 error(s) occurred:
>>
>> * api_token for auth must be specified
>>
>> Which I worked around by running packer validate -var
>> 'do_api_token=$DO_API_TOKEN' example.json which passed. More
>> importantly, when I run packer build -var 'do_api_token=$DO_API_TOKEN'
>> example.json I get the following error for DigitalOcean
>>
>> --> digitalocean: Error creating temporary SSH key: POST
>> https://api.digitalocean.com/v2/account/keys: 401 Unable to authenticate you.
>>
>> I know my DO_API_TOKEN environment variable is correct as it works with
>> other tools (Ansible) without a problem.
>>
>>
>> --
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/packer-tool/20d846ac-d7cb-41bc-ab87-52cf29669057%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/packer-tool/20d846ac-d7cb-41bc-ab87-52cf29669057%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/726dcbe3-fc98-4428-99ab-5849c3622d0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.