Closed faust64 closed 10 months ago
+1. We had an integration whose owner team ID changed in TF but it doesn't reflect on OpsGenie. The integration is still part of the old team.
This function is deliberately not updating the team field. Is it not supported by the OpsGenie API? https://github.com/opsgenie/terraform-provider-opsgenie/blob/93fbf594ffcb9b18fa20dcefefe3f4b46f1d69f4/opsgenie/resource_opsgenie_api_integration.go#L264
For now, I'm passing in -replace
to force TF to recreate the integration.
It seems like a limitation from the API: https://docs.opsgenie.com/docs/integration-api#update-integration
Indeed. Well, if opsgenie docs says one thing, while their provider does another: for sure that's a bug
When some configuration for an object can't be updated by aws or azure provider (eg: changing zone/AZ attributes) , terraform plan would show object should be re-created. Would be nice to have a similar logic implemented in opsgenie provider.
Although for sure, we can replace, taint, ... it's not blocking, critical, ... I'm already thankful I found about that provider, while we used to configure opsgenie integrations manually not long ago ... Kudos to the maintainers
Although for sure, we can replace, taint, ... it's not blocking, critical, ... I'm already thankful I found about that provider, while we used to configure opsgenie integrations manually not long ago ... Kudos to the maintainers
+1. It shouldn't be a big change to fix the provider's behavior in this case. Let me look around.
If the maintainers can help out and poke me in the right direction, that would be great as well. TIA.
Setting ForceNew
(https://developer.hashicorp.com/terraform/plugin/sdkv2/schemas/schema-behaviors#forcenew) to true for the team ID field should do the trick as far as I think.
There is already a 2-year-old PR on this: https://github.com/opsgenie/terraform-provider-opsgenie/pull/146
It would be preferable to change the team name in the integeration resource without force recreating it, as this would change the API key and break the existing integerations. I have manually changed the team name in Opsgenie, so I believe it is possible to do so.
@PrayagS I was able to change the responder team in the integrations without any issues and I can see that it gets reflected on the UI as well. Can you confirm if you're still facing the issue? I'm using v0.6.26
@koushik-swaminathan Hey, we no longer use this provider so I can't really help with that as of now.
I can confirm its fixed now in v0.6.26.
same here, thanks!
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
N/A
Expected Behavior
After applying such a plan, switching responder team from my integration, next plan should show no diff
Actual Behavior
After applying that plan, next plan still shows the exact same diff. In opsgenie, I can confirm my integration still uses the previous responder team. I suspect tainting the object would do. Although if we need to re-create, I would expect provider to do so without taints.
Steps to Reproduce
terraform plan
/terraform apply
terraform plan
/terraform apply
Important Factoids
N/A
References
not that I know of