terraform-provider-opsgenie icon indicating copy to clipboard operation
terraform-provider-opsgenie copied to clipboard

Bug: team_routing_rule is_default parameter being ignored

Open diraol opened this issue 1 year ago • 0 comments

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:

  1. terraform apply
  2. terraform 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.

diraol avatar Jul 24 '24 15:07 diraol