Open neo-nikita opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
Checked the API doc for creating a health-check. Apparently you can specify HealthThreshold
in API/CLI, which will work as expected, terraform resource seems to set this value only when child_health_threshold
is >= 1.
Terraform Core Version
1.9.1
AWS Provider Version
5.68.0
Affected Resource(s)
aws_route53_health_check
Expected Behavior
Terraform should be able create calculated
aws_route53_health_check
withchild_health_threshold
value set to 0, because that is stated in the provider documentation of the resource and that can be done in AWS Web Management Console. In my case I want to set the value to 0, so the health-check will always report healthy.Actual Behavior
Terraform is able to plan the resource, but during the apply stage it states that the threshold must be specified and exits with error below.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
main.tf
version.tf
Steps to Reproduce
child_health_threshold
set to 0 and files defined. Runterraform apply
.yes
and pressEnter
button.Workaround
child_health_threshold
to 1 and runterraform apply
.yes
and pressEnter
button.child_health_threshold
value in your health-check to 0 and runterraform apply
yes
and pressEnter
button.Debug Output
Panic Output
Would you like to implement a fix?
Not yet
Additional Notes
Same issue on the lower versions, down to 0.9
Apparently this issue only occurs in terraform resource because in API/CLI there is an additional
HealthThreshold
field that is not available in terraform, assuming it gets set behind the scenes. And it's only gets set when the value is >= 0, but API will allow 0