terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
Bug: team_routing_rule is_default parameter being ignored
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
- opsgenie_team_routing_rule
Terraform Configuration Files
resource "opsgenie_team_routing_rule" "test" {
name = "routing rule example"
team_id = "<my_team>"
order = 0
is_default = true
timezone = "America/Los_Angeles"
notify {
name = "name"
type = "schedule"
}
}
If you get into an "apply/plan" loop it will always try to change the is_default from false to true
Debug Output
# module.opsgenie_config.opsgenie_team_routing_rule.test will be updated in-place
~ resource "opsgenie_team_routing_rule" "this" {
id = "........"
~ is_default = false -> true
name = "routing rule example"
Expected Behavior
The apply should have changed the "is_default" to true.
Actual Behavior
It is always "false"
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform applyterraform plan
Important Factoids
I checked the module code in this repo and it seems that indeed isDefault is not being added to the "request" to be made to the API.
Also, by checking OpsGenie API logs I can clearly see that this attribute was sent as false, despite the fact that the terraform/opentofu plan/apply output was stating it should have been true.