Hi,
I'm running into something that I'm not sure I understand. Here's my
(stripped down for example) use case: I want to create an AMI where the
name includes the environment it is built for (test, prod, etc). Here's
the packer file (named testVar.json):
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"cpe_env": "test"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-west-2",
"source_ami": "ami-b04e92d0",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "TestAMI-{{isotime \"20060102-1504\"}}-{{user `cpe_env`}}",
"vpc_id": "someVPC",
"subnet_id": "someSubnet"
}]
}
When I run the following Packer command on Windows 10, I end up with an AMI
name like "TestAMI-20161019-2241-test". When I run the same command on
Linux (Amazon Linux), I end up with an AMI name like
"TestAMI-20161019-2241-prod".
I think this is a bug in Packer, but wanted to check here before
submitting in case I'm missing something.
packer build -var 'aws_access_key=someAccessKey' -var
'aws_secret_key=someSecretKey' -var 'cpe_env=prod' testVar.json
I've tried this Packer 0.10.1 and 0.10.2.
Thanks,
topher
--
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/c345373e-abe9-491f-bd43-3d4d71f99083%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.