opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
100 stars 135 forks source link

Time restriction drift #412

Closed gjacquet closed 9 months ago

gjacquet commented 10 months ago

Terraform Version

❯ terraform version         
Terraform v1.5.7
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v5.19.0
+ provider registry.terraform.io/hashicorp/http v3.4.0
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/opsgenie/opsgenie v0.6.34

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

     resource "opsgenie_team_routing_rule" "test" {
        name       = "test" 
        order      = 0
        team_id    = "xxx"
        timezone   = "America/Los_Angeles"

        criteria {
            type = "match-all"
        }

        notify {
            type = "none"
        }
      }

Expected Behavior

No drift once applied

Actual Behavior

Perpetual drift on opsgenie_team_routing_rule without a time_restriction. E.g.

  ~ resource "opsgenie_team_routing_rule" "test" {
        name       = "test"
        # (4 unchanged attributes hidden)

      - time_restriction {
          - restriction {
              - end_hour   = 0 -> null
              - end_min    = 0 -> null
              - start_hour = 0 -> null
              - start_min  = 0 -> null
            }
        }

        # (2 unchanged blocks hidden)
    }

Steps to Reproduce

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

  1. terraform apply
  2. terraform plan. This step will show a drift

References