-
Notifications
You must be signed in to change notification settings - Fork 769
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
Adding org owner as a team member causes new resource required on every apply #85
Comments
Interesting I have not seen this happen and I am also an
Can you try replicating with the same version? |
It's pretty easy to reproduce with the included stack file.
to reiterate, this mimics the behavior of the GitHub API which allows you to add an org owner as a team member even though an org owner always have the maintainer role on a team. |
I was able to replicate this |
Reproduced, thanks for the report. I'm going to investigate further and see how/if we can fix this. |
PR pending review: https://github.com/terraform-providers/terraform-provider-github/pull/137 It looks like historically GitHub might not have had an API for updating the membership level, or the SDK may have been missing support. Either way the PR is making the field updatable. @thomasbrezinski the output you should see after we merge and release the patched version is something like this:
So you'll still see diff, but the action is going to be a lot less destructive. I believe this diff is justified as it reflects the reality. The definition of the membership in your config is effectively |
Terraform Version
Affected Resource(s)
github_team_membership
Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
Expected Behavior
Adding an org owner to a github team with the member role should either fail or the provider should be smart enough to know that the user will always have the maintainer role and not show a change to be applied each run.
Actual Behavior
Every
terraform apply
shows a need to recreate the team membership.Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: