-
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
ASG with mixed_instance_policy cannot have on_demand_base_capacity set to 0 #7938
Comments
I can confirm the same. Even changing it from 0 to positive number, doesn't update the ASG! Same version on terraform pieces |
Hmm. Version 2.1.0 specifically should have fixed the original issue report via #7821. Does |
Plan still shows no changes. Give me 5 min and I'll put up a self-contained example that can be run. |
https://gist.github.com/MarcusNoble/3ab6f49a86a5c4c2b24b74f7f6a12d74 You just need to provide the Once applied change the |
I have also tried by compiling the latest from the master branch on GitHub and it has the same issue. |
@bflad Did you manage to verify it also wasn't working for you? |
I can confirm this too. When creating the autoscaling group, Versions:
As a workaround we're adjusting the value by hand in AWS and then modifying the terraform state to match. |
So I did a bit more testing and this actually gets weirder. It only fails to set back to 0 when it's currently set to 1. If set to 2 then terraform will pick up the change to 0 fine. I have added two tests to cover this on my fork here: https://github.com/MarcusNoble/terraform-provider-aws/commit/86c4ecf78bfe513b42a15feae2a84b1e1ae298aa 1 -> 0
2 -> 0
|
For me it doesn't let me set it to 1
min_size, max_size and and on_demand_base_capacity are set to 1. on_demand_percentage_above_base_capacity and spot_instance_pools set to 0 This is using TFE 0.12.2 and aws provider 2.40.0 |
This seems like a pretty old bug and seems like this should get prioritized. Does this require someone to shepherd these changes? |
Closed via #13623. |
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. |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The on_demand_base_capacity should always be used to set the base capacity.
Actual Behavior
When changing from a positive number to a 0 the change is ignored.
Steps to Reproduce
terraform apply
on_demand_base_capacity
to 0terraform apply
Important Factoids
Tested the tame change with the AWS CLI and the value can be successfully set to 0
The text was updated successfully, but these errors were encountered: