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.
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:
Use above resource and data in main.tf file
terraform apply
Try updating any service with other team name as owner
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
Affected Resource(s)
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:
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/