Thanks for the correction

On Thursday, May 17, 2018 at 12:14:11 PM UTC+1, Rickard von Essen wrote:
>
> Yes it works, but your example is a bit wrong. It should be like this:
>
> {
>   "variables": {
>      "ami_name": "Default name",
>      "ami_description": "Default description"
>   },
>   "builders": [{
>      ...
>      "ami_name": "{{ user `ami_name` }},
>      "ami_description": "{{ user `ami_description` }},
>      ...
>   }]
> }
>
> And then:
>
> packer build -var ami_name=Test -var ami_description=testdescription 
> template.json
>
> On 17 May 2018 at 13:03, <[email protected] <javascript:>> wrote:
>
>> can anyone advise if you are able to use ami_description as a user 
>> variable, 
>>
>> e.g. 
>>
>> "variables": {
>>     "AMIName": "{{`AMIName`}}",
>>     "ami_description": "{{`AMIDescription`}}",
>>   },
>>
>>
>> and then pass 
>>
>> packer build \ -var 'AMIName=Test' \ -var 
>> 'ami_description=testdescription' \ template.json
>>
>>
>>
>>
>> -- 
>> 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/eb35ef96-0af8-451e-af5a-8a59ff124274%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/eb35ef96-0af8-451e-af5a-8a59ff124274%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/b129d2ab-f036-4965-b224-402104f348a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to