You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"opsgenie_user""first" {
username="[email protected]"full_name="name "role="User"
}
resource"opsgenie_team""test" {
name="example"description="This team deals with all the things"member {
id="${opsgenie_user.first.id}"
}
Debug Output
N/A
Panic Output
N/A
Expected Behavior
Once the change has applied, no other changes will be detected as necessary without either the TF code changing or the config in OpsGenie changing.
Actual Behavior
Random drift:
-member {
-id="This is the user's ID"->null-role="user"->null-username="[email protected]"->null
}
+member {
+id="This ID is 100% identical to the one being deleted"+role="user"+username=Known after apply
}
Steps to Reproduce
terraform apply to apply the original config
terraform plan to see random/unexpected drift
Important Factoids
This appears to be a full regression of #326 and/or #288.
So, what I found as a workaround is if you also set the username attribute in the member block, that avoids the drift. Something with the username attribute being computed appears to be causing it to stay in a dirty state, even if neither the input nor output change between apply executions.
gustavlasko
added a commit
to gustavlasko/terraform-provider-opsgenie
that referenced
this issue
Aug 27, 2024
When adding members to a team, if you don't specify the username in the
`member` block, the member is deleted and recreated with every plan. A
workaround for this is to set the `username` for the member as well.
opsgenie#418
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
N/A
Panic Output
N/A
Expected Behavior
Once the change has applied, no other changes will be detected as necessary without either the TF code changing or the config in OpsGenie changing.
Actual Behavior
Random drift:
Steps to Reproduce
terraform apply
to apply the original configterraform plan
to see random/unexpected driftImportant Factoids
This appears to be a full regression of #326 and/or #288.
References
member
s withinopsgenie_team
s #326The text was updated successfully, but these errors were encountered: