terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
OpsGenie team routing rule errors out when criteria isn't set even though it is listed as optional
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
terraform apply
Important Factoids
References
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:
.