opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
100 stars 136 forks source link

`user_details` do not work as expected #370

Open simontabor opened 1 year ago

simontabor commented 1 year ago

When editing user_details on a user, the state does not refresh properly to reflect manual changes.

Additionally, removing user_details from a user does not work - they stay there.

Terraform Version

v1.2.9 OG provider v0.6.20

Affected Resource(s)

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "opsgenie_user" "user" {
  username  = "bob@test.com"
  full_name = "Bob"
  locale    = "en_GB"
  timezone  = "Europe/London"
  role      = "User"
  user_details = {
    currency = "gbp"
  }
}

Debug Output

--

Panic Output

None

Expected Behavior

User details currency should be updated to match the terraform configuration

Actual Behavior

No changes are detected, or when they are they aren't applied properly

Steps to Reproduce

  1. Create a user (as above) with user_details set
  2. Remove the user_details,
  3. terraform plan - plan says currency will be removed, as expected
  4. terraform apply
  5. Check in UI - currency is not actually removed

Second issue is manual edits:

  1. Create a user (as above) with user_details set
  2. Edit the user in the UI to change the currency Additional properties attribute
  3. Terraform plan - no changes are detected

Important Factoids

References

bateller commented 1 year ago

Just commenting to confirm this is an ongoing issue