opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
106 stars 137 forks source link

Service Incident Rule condition fields incomplete support #233

Open dowlingw opened 3 years ago

dowlingw commented 3 years ago

In #130 support was added for the opsgenie_service_incident_rule resource type. The support for allowed field values in rule conditions is different between the documentation and the implementation.

According to the documentation, the following fields are allowed:

 "message", "alias", "description", "source", "entity", "tags", "actions", "details", "extra-properties", "recipients", "teams", "priority"

However the implementation only allows the values:

"message", "description", "tags", "extra-properties", "recipients", "teams", "priority"

As a result, when attempting to create incident rules using the types documented, users will receive the following error:

Error: expected incident_rule.0.conditions.1.field to be one of [message description tags extra-properties recipients teams priority], got source

  on redacted.tf line 13, in resource "opsgenie_service_incident_rule" "redacted":
  13:       field          = "source"

Observed using Terraform 0.14.7 and opsgenie/opsgenie provider version 0.6.3

marcossv9 commented 1 month ago

This is related to https://github.com/opsgenie/terraform-provider-opsgenie/issues/361. I have tried to set the value of field to teams and it doesn't work. So, documentation keeps inconsistent with the implementation and the API.