-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: Auto scaling instance refresh fails with validation errors #33377
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Here is the terraform code to reproduce the issue. |
+1 on this issue This is a blocker for anyone using the aws-autoscaling-group module and instance refresh resources |
+1 on this issue. |
Instance refresh will work if you add instance_refresh = {
strategy = "Rolling"
preferences = {
min_healthy_percentage = 50
instance_warmup = 0
scale_in_protected_instances = "Ignore"
}
triggers = ["launch_template"]
} |
This functionality has been released in v5.16.2 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! |
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. |
Terraform Core Version
1.4.6
AWS Provider Version
5.16.0
Affected Resource(s)
aws_autoscaling_group
Expected Behavior
The instance refresh should not have failed due to validation errors. No values were provided for instance_refresh.preferences.scale_in_protected_instances nor for instance_refresh.preferences.standby_instances, and therefor the documented default values should have been used.
Actual Behavior
Auto scaling instance refreshes are failing since upgrading from AWS provider 5.15.0 to 5.16.0. Instance refreshes are now failing with:
Error: starting Auto Scaling Group (nexus-20230829195735457800000001) instance refresh: ValidationError: 2 validation errors detected: Value '' at 'preferences.scaleInProtectedInstances' failed to satisfy constraint: Member must satisfy enum value set: [Ignore, Wait, Refresh]; Value '' at 'preferences.standbyInstances' failed to satisfy constraint: Member must satisfy enum value set: [Terminate, Ignore, Wait]
No values were set for either of these preferences in the terraform configuration and so the documented default values should have been used.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
aws-provider-bug-33377.tar.gz
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
I am using terraform-aws-modules/autoscaling/aws version 6.10.0 (latest as of now) to create the auto scaling group. Based on the code you can see that it's using a dynamic block to the build the instance refresh configuration. No values are provided for instance_refresh.preferences.scale_in_protected_instances nor for instance_refresh.preferences.standby_instances. https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/v6.10.0/main.tf#L669
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: