When no spot ec2 is available, I expect terraform to fail with something like:
Error: creating EC2 Instance: InsufficientInstanceCapacity: We currently do not have sufficient g5.xlarge capacity in zones with support for 'gp3' volumes. Our system will be working on provisioning additional capacity.
│ status code: 500, request id: ---
Which allowed me in the past to retry under certain conditions in 5.53.0.
Actual Behavior
Under the new releases this is no longer possible as terraforms keeps going forever when there is an insufficient resource capacity.
module.triton.aws_instance.this[0]: Still creating... [49m0s elapsed]
module.triton.aws_instance.this[0]: Still creating... [49m10s elapsed]
module.triton.aws_instance.this[0]: Still creating... [49m20s elapsed]
module.triton.aws_instance.this[0]: Still creating... [49m30s elapsed]
module.triton.aws_instance.this[0]: Still creating... [49m40s elapsed]
module.triton.aws_instance.this[0]: Still creating... [49m50s elapsed]
module.triton.aws_instance.this[0]: Still creating... [50m0s elapsed]
module.triton.aws_instance.this[0]: Still creating... [50m10s elapsed]
module.triton.aws_instance.this[0]: Still creating... [50m20s elapsed]
module.triton.aws_instance.this[0]: Still creating... [50m30s elapsed]
module.triton.aws_instance.this[0]: Still creating... [50m40s elapsed]
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.8.3
AWS Provider Version
5.55.0
Affected Resource(s)
Expected Behavior
When no spot ec2 is available, I expect terraform to fail with something like:
Which allowed me in the past to retry under certain conditions in
5.53.0
.Actual Behavior
Under the new releases this is no longer possible as terraforms keeps going forever when there is an insufficient resource capacity.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
g5.12xlarge
is often unavailable ineu-west-1
)terraform init
terraform apply
To reproduce expected behaviour, you can add:
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None