Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owner team (team_id) update issue via opsgenie_service resource #437

Open
SharmaRakeshKumar opened this issue Jul 4, 2024 · 1 comment

Comments

@SharmaRakeshKumar
Copy link

Hi there,

Problem statement:
When we try to update "Owner team" i.e; team_id via opsgenie_service resource then team_id (Owner team) is not updated. Service name, description, tags are updated correctly during update, but team_id fails to get updated.
Same happens when we try to update the team manually. i.e when we remove a team manually from a service via UI and immediately add another service, then the service doesn't gets updated. To update the new "Owner team" manually we need to wait for some time after removing the previous Owner and then attach the new Owner.

Terraform Version

Terraform v1.7.2
on darwin_amd64

  • provider registry.terraform.io/opsgenie/opsgenie v0.6.35

Affected Resource(s)

  • opsgenie_service

Terraform Configuration Files

NA

Debug Output

NA

Panic Output

NA

Expected Behavior

When we update the team_id, it should be updated and reflected correctly.

Actual Behavior

When we try to update "Owner team" i.e; team_id via opsgenie_service resource then team_id (Owner team) is not updated. Service name, description, tags are updated correctly during update, but team_id fails to get updated.
Same happens when we try to update the team manually. i.e when we remove a team manually from a service via UI and immediately add another service, then the service doesn't gets updated. To update the new "Owner team" manually we need to wait for some time after removing the previous Owner and then attach the new Owner.

resource "opsgenie_team" "test-team-1" {
name = "Test team 1"
description = "New test team 1 made using in-development OpsGenie provider"
}

resource "opsgenie_team" "test-team-2" {
name = "Test team 2"
description = "New test team 2 made using in-development OpsGenie provider"
}

data "opsgenie_team" "test-team-1" {
name = "Test team 1"
}

data "opsgenie_team" "test-team-2" {
name = "Test team 2"
}

data "opsgenie_service" "test-service-1" {
name = "Test service 1"
}

data "opsgenie_service" "test-service-2" {
name = "Test service 2"
}

resource "opsgenie_service" "test-service-1" {
name = "Test service 1"
team_id = "${opsgenie_team.test-team-1.id}"
description = "New test service 1 made using in-development OpsGenie provider."
tags = ["tag1","tag2"]
}

resource "opsgenie_service" "test-service-2" {
name = "Test service 2"
team_id = "${opsgenie_team.test-team-2.id}"
description = "New test service 2 made using in-development OpsGenie provider."
tags = ["tag1","tag2"]
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Use above resource and data in main.tf file
  2. terraform apply
  3. Try updating any service with other team name as owner
  4. Update will not happen/fail.

Important Factoids

Happens both via tf local and cloud

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
https://support.atlassian.com/requests/PCS-181010/

SharmaRakeshKumar added a commit to SharmaRakeshKumar/terraform-provider-opsgenie that referenced this issue Jul 4, 2024
opsgenie#437

To achieve the team_id update, applying a quick solution - Deleting & creating service again, as there is no issue with service creation or deletion. Hence to apply a quick fix to the problem, we can delete and create the service again.
SharmaRakeshKumar added a commit to SharmaRakeshKumar/terraform-provider-opsgenie that referenced this issue Jul 4, 2024
@oeuftete
Copy link

Looks like the same as #216.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants