From 27183caadc307044405bc66f388787e2b7c3297d Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Thu, 27 Jun 2024 22:59:51 -0400 Subject: [PATCH] Increase `aws_polling` values (#68) Lately, our Windows images in AWS have been throwing a `ResourceNotReady` error: - https://github.com/nv-gha-runners/vm-images/actions/runs/9697044936/job/26775090346#step:7:262 - https://github.com/nv-gha-runners/vm-images/actions/runs/9697044936/job/26760297797#step:7:261 The link in the logs, https://developer.hashicorp.com/packer/integrations/hashicorp/amazon#resourcenotready-error, suggests that increasing the `aws_polling` values can resolve this. Therefore, this PR increases the values of the `aws_polling` properties. The default values are: ```hcl aws_polling { delay_seconds = 15 max_attempts = 40 } ``` --- source.pkr.hcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source.pkr.hcl b/source.pkr.hcl index eb33ed6..b5c13a7 100644 --- a/source.pkr.hcl +++ b/source.pkr.hcl @@ -74,7 +74,11 @@ source "amazon-ebs" "windows" { instance_type = local.instance_type region = var.aws_region - skip_create_ami = !var.upload_ami + skip_create_ami = !var.upload_ami + aws_polling { + delay_seconds = 25 + max_attempts = 60 + } shutdown_behavior = "terminate" # the `user_data` file for AWS must be wrapped in a tag user_data = <<-EOF