You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm thinking of creating a PR, but before that maybe I should make a discussion on the issue beforehand to check if this change could be accepted on this project or not.
I'm using this module for user management on my GitHub Organization. Also, I'm using a custom module to manage team membership. When I delete a module-capsuled user, as I cannot control the deletion order, terraform-provider-github first deletes the Organization membership of the user. After that it tries to delete the Team membership, but as there's no such user, it fails. Once it fails, there's no other ways to return to normal but to edit the tfstate file.
So I'd like to make this terraform-provider-github module to be able to delete the team membership state when the user is already removed. Does this behavior seem reasonable?
You can create the resources. However, when you try to remove both the membership / team membership at once, membership DELETE will succeed but team membership DELETE may fail. Once it fails, it will never be able to DELETE, and need to edit tfstate file.
Expected Behavior
github_team_membership DELETE to succeed, even if the user is not in the Organization
Actual Behavior
github_team_membership DELETE fails, because the user is not in the team any more
The text was updated successfully, but these errors were encountered:
Thank you for the response.
After having your comment, I found that in the latest Terraform version (1.1.8) this problem does not occur any more.
So I guess I should be closing this issue.
Hi, I'm thinking of creating a PR, but before that maybe I should make a discussion on the issue beforehand to check if this change could be accepted on this project or not.
I'm using this module for user management on my GitHub Organization. Also, I'm using a custom module to manage team membership. When I delete a module-capsuled user, as I cannot control the deletion order,
terraform-provider-github
first deletes the Organization membership of the user. After that it tries to delete the Team membership, but as there's no such user, it fails. Once it fails, there's no other ways to return to normal but to edit the tfstate file.So I'd like to make this
terraform-provider-github
module to be able to delete the team membership state when the user is already removed. Does this behavior seem reasonable?What to be fixed
terraform-provider-github/github/resource_github_team_membership.go
Line 143 in f9092a1
Here, all the errors are to be thrown again.
I'd like to inspect the error, and if the error is because of the user vacancy, ignore it.
Terraform Version
v0.13.7
(sorry I'm using an old version but I believe it has nothing to do with this issue)
Affected Resource(s)
Terraform Configuration Files
You can create the resources. However, when you try to remove both the membership / team membership at once, membership DELETE will succeed but team membership DELETE may fail. Once it fails, it will never be able to DELETE, and need to edit tfstate file.
Expected Behavior
github_team_membership
DELETE to succeed, even if the user is not in the OrganizationActual Behavior
github_team_membership
DELETE fails, because the user is not in the team any moreThe text was updated successfully, but these errors were encountered: