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

forced recreation of pagerduty_schedule not working propperly #43

Closed
flyhard opened this issue Oct 16, 2017 · 2 comments
Closed

forced recreation of pagerduty_schedule not working propperly #43

flyhard opened this issue Oct 16, 2017 · 2 comments
Labels

Comments

@flyhard
Copy link

flyhard commented Oct 16, 2017

Terraform Version

Terraform v0.10.7
Compiled the pagerduty module manually from master to work around bug go version <1.9

Affected Resource(s)

Please list the resources as a list, for example:

  • pagerduty_schedule

When I remove a layer from a schedule, terraform forces a new resource. Unfortunately, if the schedule is in use in a policy (which is also controlled by terraform), it cannot remove the schedule as it is still in use.

I would expect the escalation policy to remove the schedule, then the old schedule to be removed and a new one to be created and assigned to the policy.

@jonmoter
Copy link

I'm seeing this same issue. I removed a layer from my schedule, and when I apply the plan, I'm getting an error like:

* pagerduty_schedule.compute_primary (destroy): 1 error(s) occurred:

* pagerduty_schedule.compute_primary: DELETE API call to https://api.pagerduty.com/schedules/P7GK4YV failed 400 Bad Request. Code: 2001, Errors: [Schedule can't be deleted if it's being used by escalation policies], Message: Invalid Input Provided

Version info:

$ terraform version
Terraform v0.11.7
+ provider.pagerduty v1.1.1

@stmcallister
Copy link
Contributor

I believe #257 addressed this. Please reopen this issue or create a new one if that's not the case.

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

Successfully merging a pull request may close this issue.

4 participants