Adding multiple predicates to workflows with bool conditions using Terraform

I want to do something like this

resource "newrelic_workflow" "workflow-example" {
  name = "workflow-example"
  muting_rules_handling = "NOTIFY_ALL_ISSUES"

  issues_filter {
    name = "Filter-name"
    type = "FILTER"

    predicate {
      attribute = "accumulations.conditionFamilyId"
      operator = "EXACTLY_MATCHES"
      values = [ newrelic_nrql_alert_condition.number_1.id ]

    }

    predicate {
      attribute = "accumulations.conditionFamilyId"
      operator = "EXACTLY_MATCHES"
      values = [ newrelic_nrql_alert_condition.number_2.id ]

    }
  }

  destination {
    channel_id = var.alert_channel_id
  }
}

To terraform this manually created workflow

The question is: How to terraform the AND bool condition?

Hi @jorge.llanos

Thanks for reaching out, I hope you are well.

While this a little out of my scope, I did do some digging and located a doc New Relic and Terraform. It should help guide you through New Relic Terraform alerts.

I hope this was helpful, should you have any questions or updates please do reach out.

Also if this helped resolve the issue please consider selecting the Solution ( How to Use the Official Solution Checkbox )option below this post.

1 Like