Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform apply fails with Schedule can't be deleted if it's being used by an escalation policy snapshot with open incidents. #902

Open
sgujavarthy opened this issue Jul 9, 2024 · 1 comment

Comments

@sgujavarthy
Copy link

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:

  1. Remove schedule from an escalation that has open incidents.
  2. Delete schedule HCL
  3. terraform plan
  4. terraform apply
@kartik-moolya
Copy link

We have this very same issue. The error message does not help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants