Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform import does not import custom properties(extra-properties) attribute for opsgenie_alert_policy and If I apply by terraform any changes in the policy the extra-properties are deleted #456

Open
cecalero opened this issue Oct 31, 2024 · 0 comments

Comments

@cecalero
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version
1.9.7

Affected Resource(s)
Please list the resources as a list, for example:

opsgenie_alert_policy
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "opsgenie_alert_policy" "test" {
  name                 = "test"
  message              = "{{message}}"
  alert_description    = "{{description}}"
  policy_description   = "This policy allows us to create Jira tickets automatically"
  ignore_original_tags = true
  enabled              = false
  tags                 = toset(keys(merge(var.common_tags, var.P2)))
  team_id              = opsgenie_team.id
  alias                = "{{alias}}"
  filter {
    type = "match-all-conditions"
    conditions {
      expected_value = ".*(DynamoDB|SQS).*"
      field          = "message"
      not            = false
      operation      = "matches"
      order          = 2
    }
conditions {
      expected_value = "P3"
      field          = "priority"
      not            = false
      operation      = "equals"
      order          = 1
    }
  }
}

Expected Behavior

We need to include the custom properties to generate tickets in Jira. When we import the policy we don't have this information and if I include it, terraform failed. Example

  extra_properties = {
    "Impact": "Medium",
    "Urgency": "Medium",
    "Component/s": "infrastructure",
    "Phase": "Operations",
  }

Response: An argument named "extra_properties" is not expected here.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example,
terraform import . Make sure the alert policy in OG is set as a priority. Example:

Screenshot 2024-10-31 at 08 42 41

If I apply by terraform any changes in the policy the extra-properties are deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant