Inconsistent final plan with aws_cloudwatch_metric_alarm #22802
Labels
bug
Addresses a defect in current functionality.
service/cloudwatch
Issues and PRs that pertain to the cloudwatch service.
Community Note
Terraform CLI and Terraform AWS Provider Version
0.12.31
Affected Resource(s)
Terraform Configuration Files
Child module main.tf where I've removed some additional code not related to the error message. If the additional main.tf code is needed let me know.
Child module variables.tf
Parent module main.tf for
cloudwatch_alarms_defined
variable. There are additional parameters being passed in that are not related to the error message formetric_query
.Expected Behavior
I was not expecting for the output below of an inconsistent plan error showing up. I recently refactored this code to include the
for_each
loop in the child module main.tf. Previously there was nofor_each
loop orlookup
function being used.Actual Behavior
I received an error regarding an inconsistent final plan during the apply stage. This is ran through a Jenkins pipeline. I have not seen this before the refactoring of the module and I have not attempted to recreate this issue at the moment but I am planning on doing so.
Steps to Reproduce
terraform plan
terraform apply
Important Factoids
for_each
loopcloudwatch_metric_queries_defined = {}
since I am not looking to use this actual field but it is required to be in there due to the definition of thecloudwatch_alarms_defined
variable.The text was updated successfully, but these errors were encountered: