Open Manouchehri opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
cc @jmaitrehenry, @mutt13y, @JeremieCharest, @grayaii
I just ran into this bug today when trying to use this resource type. Thanks for the suggestion for a workaround. I'll try that out since it seems like this isn't getting prioritized. It seems like this may just be an issue with AWS itself as I have the same problem if I manually go and update the cloudwatch alarm. Probably need to update the terraform code to hit the API to kick off synchronization after an alarm update.
+1
Facing the same issue in hashicorp/aws v5.57.0
Terraform Core Version
v1.3.7
AWS Provider Version
v4.52.0
Affected Resource(s)
Expected Behavior
We have a aws_route53_health_check that is based off an aws_cloudwatch_metric_alarm. The aws_cloudwatch_metric_alarm checks the healthiness of an EC2 instance. When we update the instance-id of the aws_cloudwatch_metric_alarm, we would expect the aws_route53_health_check health check to start using the updated configuration of the alarm.
Actual Behavior
We update the the instance-id of the aws_cloudwatch_metric_alarm but the aws_route53_health_check still uses the OLD instance id. You have to manually go to the AWS console and click on "Synchronize Configuration" button.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Update a CloudWatch alarm, and notice that the route53 health check is still outdated.
Debug Output
No response
Panic Output
No response
Important Factoids
I did manage to find a very hacky workaround: abuse
replace_triggered_by
with anull_resource
to always run, and se usecreate_before_destroy
to safely swap out theaws_route53_health_check
.References
This is a straight copy of https://github.com/hashicorp/terraform-provider-aws/issues/3489, as it was never addressed.
Would you like to implement a fix?
No