Cannot create aws_autoscaling_group with health_check_grace_period = 0 #4981
Labels
bug
Addresses a defect in current functionality.
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Log files for three terraform runs: (failing create, successful create to 1, successful modify to 0) https://gist.github.com/brodygov/bb82545169d72e97480c3768ead31a6d
Expected Behavior
Terraform should be able to create an aws_autoscaling_group with the health_check_grace_period set to 0, which is a valid value for the grace period.
Actual Behavior
Terraform treats 0 as a null/unset value instead of an integer. The
HealthCheckGracePeriod
parameter is not included in the request whenhealth_check_grace_period = 0
, even though it is mandatory.Steps to Reproduce
terraform apply
To verify that 0 is a valid value as far as AWS is concerned
Create the autoscaling group with a grace period of 1, then set it to 0 through a modify call.
terraform apply -var grace_period=1
terraform apply -var grace_period=0
Both of these steps succeed.
Important Factoids
References
This is one instance of Terraform not having a way to identify null/unset values, which is a general core issue.
The text was updated successfully, but these errors were encountered: