-
Notifications
You must be signed in to change notification settings - Fork 777
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
github_repository_collaborator unable to validate triage
and maintain
permissions
#480
Comments
hi @HorizonNet, thanks for writing-up this issue! I was able to reproduce and looking into this more, I think we're bound by the limitations of the github API (atleast in v3...in v4 I'm able to retrieve the "maintain" permissions for my user from the GraphQL explorer), such that the permission levels provided on request to create a github collaborator are not always equal to the permission levels returned from the github API. while an invitation to collaborate in a repository can be with this being said, perhaps one way to suppress this diff will be to apply a |
hmm this issue also seems to bring up something we can further validate in the acceptance tests such that atm we're validating the cases where we invite a new collaborator and check against the invite's permissions (which can contain |
I also check the collaborators endpoints for v3 and I also see an easy way to distinguish someone with |
Ah, just saw the discussion over in #83. |
This is something I've also run into. Very similar thing. Terraform wants to reapply this change every time, even though the user already has
|
I am also getting a diff with ~ permission = "pull" -> "triage" # forces replacement |
This problem still makes every single one of our plans so noisy :( |
Took another pass at this and agree that:
Open to adding diff suppression here if that helps while we wait for a better API to become available. Aiming to get something up for review targeting our next release. |
triage
and maintain
permissions
☝🏾 could use some 👀 for anyone watching this. |
Also, remove mentions of "triage" and "admin" permissions from the documentation and examples - they don't work, because of [this bug](integrations/terraform-provider-github#480 (comment)) in the GitHub API.
👋 Hey Friends, this issue has been automatically marked as |
👋 Hey Friends, this issue has been automatically marked as |
Terraform Version
v0.12.24
Provider Version
v2.8.0
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
After importing an existing collaborator with Maintain permissions the collaborator should have
maintain
permissions in the state.Actual Behavior
After importing an existing collaborator with Maintain permissions the collaborator gets
push
permissions in the state. Runningterraform plan
afterwards notes a replacement.Running
terraform apply
in the end leads toOverall, the error is similar to #469, but the actual problem seems to be the import to the state in this situation.
Steps to Reproduce
terraform import github_repository_collaborator.my-repo-test-user my-repo:testuser
terraform plan
terraform apply
The text was updated successfully, but these errors were encountered: