terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
Team will not updated in existing OpsGenie Service
Hello,
we run the latest version of the provider (v0.5.7
) and try to adjust the resource opsgenie_service
and want to change the team_id
. In every plan and run the output brings changes to the resources but after successful run the origin is not adjusted.
Terraform Version
0.14.3
Affected Resource(s)
- opsgenie_service
Terraform Configuration Files
resource "opsgenie_team" "team_one" {
name = "Team One"
}
resource "opsgenie_team" "team_two" {
name = "Team two"
}
resource "opsgenie_service" "service_name" {
name = "Service"
team_id = opsgenie_team_one.team.id
description = "Example Team"
}
Expected Behavior
When I change the team_id
property I expected that the team will changed.
Actual Behavior
The old team is not replaced with the new one.
Steps to Reproduce
-
Apply this config (two teams and one service)
resource "opsgenie_team" "team_one" { name = "Team One" } resource "opsgenie_team" "team_two" { name = "Team two" } resource "opsgenie_service" "service_name" { name = "Service" team_id = opsgenie_team_one.team.id description = "Example Team" }
-
Apply with changed
team_id
resource "opsgenie_team" "team_one" { name = "Team One" } resource "opsgenie_team" "team_two" { name = "Team two" } resource "opsgenie_service" "service_name" { name = "Service" team_id = opsgenie_team_two.team.id description = "Example Team" }
-
You will see that still Team One is connected with the service.
https://github.com/opsgenie/terraform-provider-opsgenie/blob/6f098f5469224f725f6894a90f3b6a1496ba803f/opsgenie/resource_opsgenie_service.go#L97-L106
Seems that the team never read from the update request.
Hey Opsgenie team, is this going to be fixed soon?
The API behind this request doesn't accept team at this point-->
https://docs.opsgenie.com/docs/service-api#update-service