terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
opsgenie_escalation should support recipient of type team with name
Hey, when I add:
recipient {
type = "team"
name = "${each.value}-${var.opsgenie_escalation_name}"
}
I get error:
Error: Unsupported argument
on escalation.tf line 63, in resource "opsgenie_escalation" "this":
63: name = "${each.value}-${var.opsgenie_escalation_name}"
An argument named "name" is not expected here.
This is due to not supporting anything other than id
in provider code
https://github.com/terraform-providers/terraform-provider-opsgenie/blob/d4833d9233afe965e23cc743cc51c6b22c3ef458/opsgenie/data_source_opsgenie_escalation.go#L40-L56
Yet, opsgenie
API supports it
If recipient type is schedule or team, you can use name or id fields for referring to notified. Otherwise (type is user), we use username or id for referencing
https://docs.opsgenie.com/docs/escalation-api#section-escalation-rules-fields