Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading AWS Provider from 4.24.0 to 4.26.0 breaks Auto Scaling Group creation. Scaling activity fails: "Your requested instance type is not supported in your requested Availability Zone" #26377

Closed
SladeRun14 opened this issue Aug 18, 2022 · 5 comments · Fixed by #31551
Labels
bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@SladeRun14
Copy link

Terraform Version

Terraform v1.2.7
on windows_amd64
AWS Provider v4.26.0

Terraform Configuration Files

See (and diff) plan JSON files (good-v.4.24.0 and bad-4.26.0), attached.

Debug Output

module.hashicorp-cluster.module.servers.aws_route53_record.server_cluster_lb_record: Creation complete after 41s [id=Z14Y1VSI6DSFDD_athleticatech.com_A]

Error: waiting for Auto Scaling Group (terraform-20220818151902124000000001) capacity satisfied: 1 error occurred:
* Scaling activity (a2760ac6-2579-bb25-f1fe-a662d3de567a): Failed: Your requested instance type (t3.small) is not supported in your requested Availability Zone (us-east-1e). Please retry your request by not specifying an Availability
Zone or choosing us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f. Launching EC2 instance failed.

with module.hashicorp-cluster.module.clients.aws_autoscaling_group.client_autoscaling_group,
on modules\clients\autoscaling_group.tf line 37, in resource "aws_autoscaling_group" "client_autoscaling_group":
37: resource "aws_autoscaling_group" "client_autoscaling_group" {

real 3m59.486s
user 0m0.092s
sys 0m0.200s

Expected Behavior

After an upgrade from v.4.24.0 to v.4.26.0 Auto Scaling Group creation should succeed as does in v4.24.0 prior to upgrade and without the need to add the exclude_names = ["us-east-1e"] parameter to the: data "aws_availability_zones"{... block.

Actual Behavior

Version 4.26.0 Auto Scaling Group creation fails

Steps to Reproduce

Starting with AWS Provider v4.24.0:
terraform init -upgrade
terraform apply

Additional Context

Work-around: Adding the exclude_names = ["us-east-1e"] parameter to the: data "aws_availability_zones" ... block results in a successful deployment.
good-bad-plans.zip

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/ec2 Issues and PRs that pertain to the ec2 service. labels Aug 18, 2022
@ewbankkit
Copy link
Contributor

Relates: #25987.

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 18, 2022
@jfirebaugh
Copy link

Same issue as #27456.

@tomcart90
Copy link

Having worked around the lack of support for an instance type in a given AZ by excluding that AZ from the list of those available to the ASG we've still managed to hit a similar issue (albeit very rarely):

16:49:41  	* Scaling activity (31c61e68-d3f2-7178-5c2a-0f59d63cedf5): Failed: We currently do not have sufficient t3a.small capacity in the Availability Zone you requested (eu-central-1a). Our system will be working on provisioning additional capacity. You can currently get t3a.small capacity by not specifying an Availability Zone in your request or choosing eu-central-1b, eu-central-1c. Launching EC2 instance failed.

Nothing new here, just wanted to point out the additional failure case.

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

This functionality has been released in v5.1.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
5 participants