Skip to content

github_repository_collaborator broken since v2.8.0 #469

Closed

Description

@tpatzig

Since github provider v2.8.0 the github_repository_collaborator resource is broken.
It fails with User <username> is already a collaborator. In v2.7.0 this worked as expected.

Terraform Version

v0.12.25

Affected Resource(s)

  • github_repository_collaborator

Terraform Configuration Files

resource "github_repository" "my_repo" {
  name        = "my_repo"
  private     = true
  description = ""
}

resource "github_repository_collaborator" "user_foobar" {
  repository  = github_repository.my_repo.name
  username   = "foobar"
  permission = "pull"
}

Panic Output

Expected Behavior

What should have happened?

The collaborator should be added to the repository and the resource should be in the state.

Actual Behavior

What actually happened?

The collaborator gets added to the repository with the correct permissions,
but terraform fails with this error and the resource is not in the state.

Error: User foobar is already a collaborator

  on test.tf line 7, in resource "github_repository_collaborator" "user_foobar":
  7: resource "github_repository_collaborator" "user_foobar" {

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

References

Activity

  1. added
    Type: Bug
    on May 20, 2020
  2. added this to the v2.9.0 milestone on May 20, 2020
  3. anGie44 commented on May 23, 2020

    @anGie44
    Collaborator

    hi @tpatzig, thank you for writing up this issue!
    so I'm able to reproduce this with the latest release of the provider (and not in 2.7.0 as suggested) but only if the collaborator in question is also the owner/admin in the repository being created. what's the relationship of the collaborator to the repository in your case?

  4. jcudit commented on May 30, 2020

    @jcudit
    Contributor

    Experimentation confirms identical API calls between the two versions.
    More 👀 welcome though in case I missed something:

    v2.8.0

    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: 2020/05/30 09:55:03 [DEBUG] Creating repository collaborator: jcudit (terraformtesting/collaboration)
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: 2020/05/30 09:55:03 [DEBUG] Github API Request Details:
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: ---[ REQUEST ]---------------------------------------
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: PUT /repos/terraformtesting/collaboration/collaborators/jcudit HTTP/1.1
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Host: api.github.com
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: User-Agent: go-github
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Content-Length: 22
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Accept: application/vnd.github.v3+json
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Content-Type: application/json
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Accept-Encoding: gzip
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4:
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: {
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4:  "permission": "pull"
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: }
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4:
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: -----------------------------------------------------
    2020-05-30T09:55:03.036-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: 2020/05/30 09:55:03 [TRACE] Acquiring lock for GitHub API request (%!q(<nil>))
    2020-05-30T09:55:03.247-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: 2020/05/30 09:55:03 [TRACE] Releasing lock for GitHub API request (%!q(<nil>))
    2020-05-30T09:55:03.247-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: 2020/05/30 09:55:03 [DEBUG] Github API Response Details:
    2020-05-30T09:55:03.247-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: ---[ RESPONSE ]--------------------------------------
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: HTTP/1.1 204 No Content
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Content-Length: 0
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Access-Control-Allow-Origin: *
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Content-Security-Policy: default-src 'none'
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Date: Sat, 30 May 2020 13:55:03 GMT
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Server: GitHub.com
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Status: 204 No Content
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: Vary: Accept-Encoding, Accept, X-Requested-With
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Accepted-Oauth-Scopes:
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Content-Type-Options: nosniff
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Frame-Options: deny
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Github-Media-Type: github.v3; format=json
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Github-Request-Id: C931:63D2:16DF73:421DBD:5ED265B7
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Oauth-Scopes: admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, repo, user
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Ratelimit-Limit: 5000
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Ratelimit-Remaining: 4922
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Ratelimit-Reset: 1590847556
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: X-Xss-Protection: 1; mode=block
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4:
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4:
    2020-05-30T09:55:03.248-0400 [DEBUG] plugin.terraform-provider-github_v2.8.0_x4: -----------------------------------------------------
    2020/05/30 09:55:03 [DEBUG] github_repository_collaborator.jcudit: apply errored, but we're indicating that via the Error pointer rather than returning it: User jcudit is already a collaborator
    2020/05/30 09:55:03 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: User jcudit is already a collaborator
    2020/05/30 09:55:03 [ERROR] <root>: eval: *terraform.EvalSequence, err: User jcudit is already a collaborator
    
    Error: User jcudit is already a collaborator

    v2.7.0

    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [DEBUG] Creating repository collaborator: jcudit (terraformtesting/collaboration)
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [DEBUG] Github API Request Details:
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: ---[ REQUEST ]---------------------------------------
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: PUT /repos/terraformtesting/collaboration/collaborators/jcudit HTTP/1.1
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Host: api.github.com
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: User-Agent: go-github
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Content-Length: 22
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Accept: application/vnd.github.v3+json
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Content-Type: application/json
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Accept-Encoding: gzip
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: {
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:  "permission": "pull"
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: }
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: -----------------------------------------------------
    2020-05-30T09:59:34.263-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [TRACE] Acquiring lock for GitHub API request (%!q(<nil>))
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [TRACE] Releasing lock for GitHub API request (%!q(<nil>))
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [DEBUG] Github API Response Details:
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: ---[ RESPONSE ]--------------------------------------
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: HTTP/1.1 204 No Content
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Content-Length: 0
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Access-Control-Allow-Origin: *
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Content-Security-Policy: default-src 'none'
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Date: Sat, 30 May 2020 13:59:34 GMT
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Server: GitHub.com
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Status: 204 No Content
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Vary: Accept-Encoding, Accept, X-Requested-With
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Accepted-Oauth-Scopes:
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Content-Type-Options: nosniff
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Frame-Options: deny
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Github-Media-Type: github.v3; format=json
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Github-Request-Id: C9A7:1E8C:2B5799:7953D9:5ED266C6
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Oauth-Scopes: admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, repo, user
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Ratelimit-Limit: 5000
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Ratelimit-Remaining: 4916
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Ratelimit-Reset: 1590847556
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: X-Xss-Protection: 1; mode=block
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: -----------------------------------------------------
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [DEBUG] Github API Request Details:
    2020-05-30T09:59:34.444-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: ---[ REQUEST ]---------------------------------------
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: GET /repos/terraformtesting/collaboration/invitations?per_page=100 HTTP/1.1
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Host: api.github.com
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: User-Agent: go-github
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Accept: application/vnd.github.v3+json
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: Accept-Encoding: gzip
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4:
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: -----------------------------------------------------
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [TRACE] Acquiring lock for GitHub API request ("collaboration:jcudit")
    2020-05-30T09:59:34.445-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:34 [DEBUG] Sleeping 1s between write operations
    2020-05-30T09:59:35.571-0400 [DEBUG] plugin.terraform-provider-github_v2.7.0_x4: 2020/05/30 09:59:35 [TRACE] Releasing lock for GitHub API request ("collaboration:jcudit")
    
    ... continues successfully ...
    

  5. jcudit commented on May 30, 2020

    @jcudit
    Contributor

    Looks like we released a change in how we interpret a 204 response. I'm unsure of how to proceed as this is in line with GitHub documentation.

    @tpatzig from a user perspective, would you rather we emit a warning in this scenario instead of failing the run with an error?

  6. HorizonNet commented on May 31, 2020

    @HorizonNet

    @jcudit I ran into the same problem under different circumstances over in #480 and I would rather expect a warning than an error. In my case the user was an organizational admin and got admin permissions automatically for the repository (check via the /repos/:owner/:repo/collaborators/:username/permission endpoint). For documentation purposes the admin was also explicitly added to the repositories collaborators where he is an active member.

  7. tpatzig commented on Jun 2, 2020

    @tpatzig
    Author

    Hi @anGie44, the collaborator I'm trying to add is an outside the organization collaborator.
    It is not the same admin user I've configured the provider with and the repo is created with.

    Hi @jcudit, I do not see, why this should fail or error at all 🤷‍♂️
    This outside collaborator is added to that repo for the first time; it is not the owner/admin of that repo. Without that collaborator resource that user would have no permissions on that repo.

  8. anGie44 commented on Jun 2, 2020

    @anGie44
    Collaborator

    @tpatzig by outside does that also mean the user is not part of a team within the org and the org has Base Permissions set to None? I was also able to reproduce this scenario in v2.8.0 and not v2.7.0 by adding a completely new user foobar (outside org and not the user authenticated with the provider) first to a team that lives within an org (org has Base Permissions set to None so private repos are not visible from the new user's perspective even while in the team), and then I attempted to add the new user as a collaborator and got the error Error: User foobar is already a collaborator in v2.8.0

  9. HorizonNet commented on Jun 2, 2020

    @HorizonNet

    I also did some more testing on this one today. My organization also has Base Permissions set to None and I'm trying to add a user (which is already part of my organization) to a repository with Write permissions. The user gets added, but the apply fails with the error message above. Note that the user is not an organizational administrator.

  10. modified the milestones: v2.9.0, v2.9.1 on Jun 3, 2020
  11. tpatzig commented on Jun 5, 2020

    @tpatzig
    Author

    Yes, with outside collaborator I mean a gh user, that is not part of the organisation (nor in any of the organisations teams) by intention. The Base Permissions of our Org is Read.

  12. greg-szabo commented on Jun 14, 2020

    @greg-szabo

    Edit: If you want the short version, @jcudit wrote it up here. My take is that the GitHub API documentation is incomplete and 204 should be accepted as an OK until it's fixed/updated. (Which means a manual check needs to happen before the collaborator is added.)


    I was able to reproduce the issue with

    Terraform 0.12.26
    provider.github v2.8.1

    Test

    • User is a member of the organization
    • User was not affiliated with the repo before (the admin was trying to add user to the repo)
    • During multiple tests, the user was added with "pull", "push", "triage", "maintain", "admin" permissions

    Result

    • In each case the expected permission is set in GitHub. (Good!)
    • In each case, Terraform reports the "User X is already a collaborator" error. (Bad)

    Additional test

    • I added the user to the repo as a collaborator outside of Terraform
    • I reran the Terraform code multiple times with different permission set

    Additional Result

    • Terraform reported that the user is already a collaborator (Good!)
    • GitHub showed that the user permissions changed in line with the Terraform code (Weird/Bad from a Terraform perspective)

    My understanding is that GitHub reports back with a 204 to every command and that is considered an error in Terraform: https://github.com/terraform-providers/terraform-provider-github/blob/master/github/resource_github_repository_collaborator.go#L77
    I think GitHub never really had any internal errors about the request, it's just that 204 is the default response to any changes.

    Troubleshooting details
    According to the GitHub API description on adding collaborators, there are two possible responses to the call:

    • 201 (and some content), if an invitation was sent to the invited GitHub user
    • 204 if the user is already a collaborator

    What the API documentation fails to mention (at least in my case), is that if a user is a member of my organization, the user will not need an invitation to be added as a collaborator to a repository within the organization.

    So, my assumption is that since the user doesn't need an invite, a 201 response would be inappropriate. The only other defined response is 204 and for whatever reason, GitHub API chooses to send that in each OK case. This suspicion is further advanced by the "Remove a repository collaborator" documentation below in the API, which also responds with 204 if the collaborator was successfully removed.

    In short: the GitHub API documentation fails to mention that 204 is reported in any regular case.

    What's worse, it seems to execute the request properly, before reporting 204, even when the user is really a collaborator on the repo.

    Additional note: the call to GitHub AddCollaborator seems fine.

    Proposed solution
    Assume that 204 == OK. This seems to be a shortcoming of the GitHub API documentation.

    1. In resourceGithubRepositoryCollaboratorCreate, check if the user is already added to the repo as a collaborator, with the correct permission. (With this API call.)
    2. If the user is already added, error out. (As is expected by Terraform for non-managed resources.)
    3. If the user is not added call AddCollaborator.
    4. If the response is not 204 (or 201, I guess, I'm not sure where that's checked), error out. (Opposite of current check.)
  13. emmahsax commented on Jun 18, 2020

    @emmahsax

    Personally, I'd prefer never erring and only giving warnings. If I have a user that has access to the repo already (say through a team), but we want to give this single user (not the whole team) more access, I'd want to be able to do that through the github_repository_collaborator step. So, if the user already has access to the repo but with LESS permissions than the Terraform is trying to add, then the permissions should update to reflect Terraform.

  14. devinrsmith commented on Jul 14, 2020

    @devinrsmith

    I'm running into this issue now on provider v2.19.

  15. dennasolon commented on Jul 14, 2020

    @dennasolon

    I also have this issue with repo collaborators that are managed by Terraform via this provider.
    Applying the plan creates the collaborators on the repo but then causes the errors noted in this issue.

    If you then import the resource into the state and rerun the plan the infra is up to date and not changes are detected.
    Hopefully this gets fixed soon.

  16. modified the milestones: v2.9.1, v3.0.0 on Jul 21, 2020
  17. victorwongth commented on Aug 14, 2020

    @victorwongth

    Even though this is now closed with a fix, we are still experiencing the issue with

    Terraform version v0.12.25
    Provider version 2.9.2

    We have to revert to Provider version 2.7.0 to get rid of the error.

  18. anGie44 commented on Aug 14, 2020

    @anGie44
    Collaborator

    Hi @victor-wong-dragon, apologies for the confusion! the PR #525, while merged, hasn't released with a recent version of the provider. I just updated the PR with the 3.0.0 milestone link. There are still a couple items in https://github.com/terraform-providers/terraform-provider-github/milestone/12 that are pending before the major release.

  19. carbohydrates commented on Aug 21, 2020

    @carbohydrates

    Hello @anGie44 can we release the 2.9.3 version with this bugfix before 3.0.0?
    Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions