-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Open
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/autoscalingIssues and PRs that pertain to the autoscaling service.Issues and PRs that pertain to the autoscaling service.
Description
Terraform and AWS Provider Version
Terraform v1.12.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.100.0
I believe the relevant line is still in main, so I suspect this bug is still present in v6.
Affected Resource(s) or Data Source(s)
- aws_autoscaling_group (warm_pool)
Expected Behavior
...
warm_pool {
pool_state = "Stopped"
min_size = 0
max_group_prepared_capacity = 0
instance_reuse_policy {
reuse_on_scale_in = false
}
}
This should set the warm pool's minimum size to 0
Actual Behavior
expandPutWarmPoolInput does not send the min_size attribute if it is set to 0, leaving the current min_size in place.
Relevant Error/Panic Output
No response
Sample Terraform Configuration
resource "aws_autoscaling_group" "example" {
vpc_zone_identifier = ["subnet-example-1", "subnet-example-2"]
desired_capacity = 0
min_size = 0
max_size = 5
launch_template {
id = "lt-example-1"
version = "$Default"
}
warm_pool {
pool_state = "Stopped"
min_size = 0
max_group_prepared_capacity = 0
instance_reuse_policy {
reuse_on_scale_in = false
}
}
}
Steps to Reproduce
terraform init
terraform apply
Debug Logging
No response
GenAI / LLM Assisted Development
No response
Important Facts and References
This is identical behavior to the max_group_prepared_capacity bug on #37173 that was fixed by #37174
I'm going to try to implement this fix since this looks so similar to that issue/pull, but if someone else gets there first that's fine :)
Would you like to implement a fix?
Yes
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/autoscalingIssues and PRs that pertain to the autoscaling service.Issues and PRs that pertain to the autoscaling service.