Operations Terraform Provider - alert policy resource incorrect Team ID check

XMLWordPrintable

    • 1
    • Severity 2 - Major
    • 2

      Issue Summary

      The alert policy resource in our Terraform provider checks if the team_id is null or unknown, but the value returned from the API is an empty string.

      Relevant line of code:

      https://github.com/atlassian/terraform-provider-atlassian-operations/blob/main/internal/provider/alert_policy_resource.go#L77

      The Opsgenie provider checks for an empty string:

      https://github.com/opsgenie/terraform-provider-opsgenie/blob/master/opsgenie/resource_opsgenie_alert_policy.go#L280

      Steps to Reproduce

      1. Create a terraform provider with alert policy resources with no teams
      2. Apply the policy

      Expected Results

      If this matches the existing policies, it shouldn't replace them.

      Actual Results

      The policies are replaced when running the terraform apply

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Brennan Kiely
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: