PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
204 stars 212 forks source link

pagerduty_event_orchestration_global "update in place" when no change present #915

Open jd-ohea opened 4 months ago

jd-ohea commented 4 months ago

Terraform Version

v1.8.5

Terraform Configuration Files

resource "pagerduty_event_orchestration_global" "sample_pagerduty_resource_name" {
  for_each            = { for service in local.technical_services : service.name => service }
  event_orchestration = pagerduty_event_orchestration.sample_pagerduty_event_orchestration.id
  set {
    id = "start"

    rule {
      label    = "Sample label"
       ...
     }
     ...
   }
   ...
}

Expected Behavior

No change present in the global orchestration

Actual Behavior

There was a change detected in the configuration when in fact there was no change present.

  # module.global_orchestration.pagerduty_event_orchestration_global.sample_pagerduty_resource_name["sample-service"] will be updated in-place
  ~ resource "pagerduty_event_orchestration_global" "sample_pagerduty_resource_name" {
        id                  = "sample-id"
        # (1 unchanged attribute hidden)

      ~ set {
            id = "sample-id-2"

          ~ rule {
                id       = "sample-id-3"
              - label    = "Sample label" -> null
                # (1 unchanged attribute hidden)

                # (1 unchanged block hidden)
            }

            # (22 unchanged blocks hidden)
        }

        # (3 unchanged blocks hidden)
    }

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply a pagerduty_event_orchestration_global with a label. (setup the global orchestration like above with a for loop)
  2. terraform apply again and the labels in the resources will be expected to be removed even though there was no change to the code