Time restriction drift on latest Terraform provider

XMLWordPrintable

    • Severity 2 - Major

      Issue Summary

      Customer reported facing a regression with the latest terraform provider for OpsGenie.

      Customer has reported the issue on Github: https://github.com/opsgenie/terraform-provider-opsgenie/issues/412.

      Plans will now continuously show a drift on resources that were not having issue before the provider upgrade.

      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)

      • opsgenie_team_routing_rule (possibly anything else using time_retriction)

      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" }
      
      }
      

      Steps to Reproduce

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

      Expected Results

      No drift once applied

      Actual Results

      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)
          }
      

      References

      *Above copied/extracted from Github Issue #412

      Workaround

      Customer believes https://github.com/opsgenie/terraform-provider-opsgenie/pull/413 would fix it

            Assignee:
            Koushik S (Inactive)
            Reporter:
            Wei Wung (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: