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

Panic when importing an alert policy

Open gdlx opened this issue 2 years ago • 2 comments

Hi, I get a panic when importing an alert policy: https://gist.github.com/gdlx/19d7fcca60439d6c6b372e0db3a7addd

The import command is the following: terraform import opsgenie_alert_policy.add_tag 8a2e4b35-94ec-4192-a64f-f0ad52b8ef43

I have no issue to create/update/delete a policy, only when importing.

The alert policy template is the following:

resource "opsgenie_alert_policy" "add_tag" {
  name               = "Add Tag test"
  team_id            = data.opsgenie_team.my_team.id
  policy_description = "Adds TEST tag to all alerts."
  message            = "{{message}}"
  continue_policy    = true
  enabled            = false

  filter {}
  tags = ["TEST"]
}

Terraform version: 1.3.7 Opsgenie provider version: 0.6.20

gdlx avatar Feb 08 '23 16:02 gdlx