PagerDuty / terraform-provider-pagerduty

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

`pagerduty_team` getting updated in-place even though there are no changes #911

Open zanthorn opened 2 months ago

zanthorn commented 2 months ago

I manage PD with terraform but have made some manual changes in the UI which has led to some drift. I'm attempting to reconcile those changes, but for some reason the pagerduty_team show in-place updates even though nothing about the teams has changed. The TF defining these resources seems to match what is configured in PagerDuty. Why are these teams being updated if all values match?

Terraform Version

1.6.1

Affected Resource(s)

Terraform Configuration Files

resource "pagerduty_team" "cloudops" {
  name         = "CloudOps"
  description  = "Cloud Operations"
  default_role = "manager"
}

resource "pagerduty_team" "core" {
  name         = "Core"
  description  = "GSC Core Engineering"
  default_role = "manager"
}

Debug Output

I can provide the debug output securely. There is sensitive information outside of the API token that I don't want to share publicly, like employee PII.

Here is cleaned up plan output

Panic Output

No panic

Expected Behavior

pagerduty_team should not change if all values match the existing configuration

Actual Behavior

The pagerduty_team will be updated in-place, and new team IDs will be generated causing a cascade of changes downstream

Steps to Reproduce

Unsure of how or why this is happening so I can't say the steps to repro

Important Factoids

Nothing particularly interesting

References

I could not find any existing related issues