Working reproduction of EP Management problem + Fix #898
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.
Problem: Escalation policies are wrongly reassigned when a pagerduty_team_membership resource is deleted.
This pull request adds a test, TestAccPagerDutyTeamMembership_basic, reproducing a bug in the code that manages the deletion of
pagerduty_team_membership
objects.First message to PD Support:
When running the below test, the following error message is generated:
Key is looking at the PUT call: the Provider is attempting to attach an unrelated and already-attached EP to a team, which results from the logic around how EPs are managed on team_membership deletion, as described above. I've redacted the team IDs here, but I will provide them to support. Running these Acceptance Tests yourself should replicate the error. Please let me know if it doesn't.
I found the following PRs that attempt to address the same issue. It seems like I’m not far off the mark with my original assessment.
I am using version 3.14.4, which incorporates PR 838, which looks like an attempt to address this exact problem.