[terraform] pagerduty_schedule and how you handle deleted schedules?


Relatively new to PagerDuty we’re just in process of rolling this out. We’ve got everything in Terraform, but noticed upon deleting a schedule via the UI, upon Terraform running again rather than provisioning the deleted schedule the Terraform plan appears to get stuck looking for a reference to the deleted schedule.

e.g. GET API call to https://api.eu.pagerduty.com/schedules/PGID1234 failed 404 Not Found. Code: 3004, Errors: , Message: Schedule Not Found

How have others worked around this? Ideally we just want it to see its not there and therefore create it acccordingly.

Thanks in advance for any tips,


My advice is to decide to go all in with Terraform and not use the UI at all for configuration, or use Terraform for a portion and allow the use of the UI for certain things like schedules.