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

opsgenie_service does not work as expected #371

Closed rakesh-bitso closed 1 year ago

rakesh-bitso commented 1 year ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Affected Resource(s)

Please list the resources as a list, for example:

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

Terraform Configuration Files

{ "locals": { "services": { "test-service": { "description": "test description", "owner": "Team_1" } } } }

resource "opsgenie_service" "services" { for_each = local.services name = each.key description = each.value.description team_id = each.value.owner }



### Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

### Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.

### Expected Behavior
- Service owner should be updated if owner in updated in local.

### Actual Behavior
- Service owner not getting updated when owner is updated in local. To reflect the updated owner name first I need to delete the resource then need to create again currently.

### Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
1. Update description / owner details in locals
2. terraform apply

### Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

### References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
- GH-1234
arjunrajpal commented 1 year ago

Hi @rakesh-bitso, in our terraform provider opsgenie, we make use of public api to update a service. At present this api does not have the capability to update the team corresponding to the service. So we will not be able to provide the requested functionality at this point in time. The workaround is to delete the service and create a new service with the required team.