terraform-provider-pagerduty
terraform-provider-pagerduty copied to clipboard
`terraform apply` fails with Schedule can't be deleted if it's being used by an escalation policy snapshot with open incidents.
Use case: Schedule can't be deleted if it's being used by an escalation policy snapshot with open incidents.
This is provider issue as terrafrom plan succeeds, but terraform apply fails with the following error message: Schedule can't be deleted if it's being used by an escalation policy snapshot with open incidents
Moreover, there is no useful error message to the user on how to get the list of those blocking incidents.
Terraform Version
terraform 1.1.5
PagerDuty Provider version: 3.12.1
Affected Resource(s)
- pagerduty_schedule
Actions:
delete
Debug Output from Terrafrom Apply
Error: DELETE API call to https://api.pagerduty.com/schedules/P6LHGHQ failed 400 Bad Request. Code: 2001, Errors: [Schedule can't be deleted if it's being used by an escalation policy snapshot with open incidents], Message: Invalid Input Provided
Expected Behavior
What should have happened?
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Remove schedule from an escalation that has open incidents.
- Delete schedule HCL
-
terraform plan
-
terraform apply