hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.11k stars 3.33k forks source link

Set ENV vars to override default AWS_MAX_ATTEMPTS within packer.json file #9756

Closed jashan05 closed 4 years ago

jashan05 commented 4 years ago

Hello Team,

We are using packer to build our ebs-backed AMI's but we are running into errors recently. I enabled the logging to get correct error message and it seems we are exceeding the wait attempts:

2020/08/12 11:53:47 [INFO] (telemetry) ending goss
==> amazon-ebs: Stopping the source instance...
    amazon-ebs: Stopping instance
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Creating AMI xxxxxx from instance xxxxxx
    amazon-ebs: AMI: xxxxxx
==> amazon-ebs: Waiting for AMI to become ready...
2020/08/12 12:19:21 packer: 2020/08/12 12:19:21 Error waiting for AMI: ResourceNotReady: exceeded wait attempts
==> amazon-ebs: *Error waiting for AMI. Reason: <nil>*
==> amazon-ebs: Provisioning step had errors: Running the cleanup provisioner, if present...
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: Deleting temporary keypair...

Cant we make it part of packer.json file which we use to build with packer. Wouldnt it be better if we can specify that in json file directly as optional variables

Best Regards, Jashan

SwampDragons commented 4 years ago

Good question. I think that makes sense, especially for the long wait at the end.

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.