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

OpsGenie team routing rule errors out when criteria isn't set even though it is listed as optional

Open thomschlereth opened this issue 4 years ago • 1 comments
trafficstars

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

Terraform v0.14.9 provider registry.terraform.io/opsgenie/opsgenie v0.6.3

Affected Resource(s)

Please list the resources as a list, for example:

  • opsgenie_team_routing_rule

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_team_routing_rule" "foo" {
  name     = "${var.name}_foo"
  team_id  = local.team_id
  order    = 2
  notify {
    type = "none"
  }
}

Debug Output

module.foo_team.opsgenie_team_routing_rule.foo: Creating...

Error: criteria condition type should be one of match-all, match-any-condition or match-all-conditions

  on ../modules/team/routing_rules.tf line 92, in resource "opsgenie_team_routing_rule" "foo”:
  92: resource "opsgenie_team_routing_rule" "foo” {

Expected Behavior

Should have created as criteria is listed as an optional field. Would have expected it to create/overwrite the the "default" path in the routing rules

Actual Behavior

Errored out with the error above

Steps to Reproduce

  1. terraform apply

Important Factoids

References

thomschlereth avatar Apr 01 '21 20:04 thomschlereth

This is still happening today. This also leads to a different opsgenie_team_routing_rule than it would be when configured via the web UI. Via the web UI this is actually really optional.

Configured via terraform this looks like this now:

Screenshot 2022-03-15 at 08 45 31 .

stefanandres avatar Mar 15 '22 07:03 stefanandres