Return remediation measures for team membership deletion with EP dependencies #863
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update aims to address the error:
which occurs when attempting to destroy a pagerduty_team_membership with Escalation Policy dependencies.
An automated workaround for addressing this API error was firstly introduced by #558 back in August 2022, and and improvement on how to collect the conflictive EPs was added by #918 just a couple of weeks ago.
However, this automated approach has started to cause issues on our backend, and the Engineering Team responsible for these APIs has requested that we revert this workaround.
As a result, we are retaining the logic to collect the conflicting Escalation Policies. However, you, as a Terraform Practitioner, will now need to manually apply the remediation measures before proceeding with the removal of the targeted
pagerduty_team_membership
.Previously, the error related to Escalation Policies belonging to the Team was suppressed. Now, you will see an error message similar to the following:
After completing one of the above remediation options, you can proceed with the destruction of the Team Membership.
We understand that this may represent a suboptimal solution as it removes automation in favor of adding manual tasks. However, we have maintained the automated approach as long as possible. For the sake of your PagerDuty configuration and our object relation consistency, we must take this step backward.
Nonetheless, this update improves upon the original state of the API error by providing more helpful information than just
"User cannot be removed as they belong to an escalation policy on this team"
.Side Note: This does not represent any changes to current
pagerduty_team_membership
API.Acceptance tests results