When creating an escalation policy, the plugin crashes if you include a repeat block in the code, but set all of the values inside to null.
However, if you make this block dynamic, and set the default to {} using a try block, it works.
See below for details:
Terraform Version
Terraform v1.5.7
Affected Resource(s)
opsgenie_escalation
Terraform Configuration Files
Escalations are being passed in via YAML, like so:
escalations:
support_escalation:
description: Escalation Policy for Support Tickets
rules:
initial:
condition: if-not-acked
notify_type: users
delay: 0
recipient:
type: team
id: <team-id>
repeat:
wait_interval: 10
count: 1
reset_recipient_states: true
close_alert_after_all: false
When the repeat yaml is removed from above, and all values in the terraform block are set to null, the plugin crashes. The Terraform code is below:
When creating an escalation policy, the plugin crashes if you include a
repeat
block in the code, but set all of the values inside tonull
. However, if you make this block dynamic, and set the default to{}
using atry
block, it works. See below for details:Terraform Version
Terraform v1.5.7
Affected Resource(s)
Terraform Configuration Files
Escalations are being passed in via YAML, like so:
When the
repeat
yaml is removed from above, and all values in the terraform block are set tonull
, the plugin crashes. The Terraform code is below:However, change that
repeat
block to dynamic, and it works:Debug Output
https://gist.github.com/stan-hill-oxa/767ac5e31f32cddda8c5bad159542ba8
Expected Behavior
An opsgenie_escalation resource (i.e an Escalation Policy) is created without the
repeat
configuration, without using a dynamic block.Actual Behavior
Error: The terraform-provider-opsgenie_v0.6.35 plugin crashed!
- when block is not dynamic. Terraform is successful when block is dynamic.Steps to Reproduce
repeat
in your YAML, and the plugin will crashrepeat
terraform block to be dyanmic, with a default of{}
(see above).