-
Notifications
You must be signed in to change notification settings - Fork 768
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
Cannot create github_branch_protection_v3 after update to v5.3.0 #1307
Comments
Can confirm this. Thanks for reporting @jtsaito ! Update: and we've also locked ourselves to v5.2.0 and this one works supersmooth... |
@iniinikoski Thanks for looking into it and confirming the bug. |
same here |
Oh no! What a hassle. It looks like that was introduced to google/go-github in this PR, based off of this issue. Interestingly enough, that issue references #1147. Looking at our relevant code here and here, I'm not sure what we could do to fix this on our side...perhaps the appropriate course of action is an upstream revert? Perhaps experimenting with setting something other than Is anybody interested in exploring this further in a PR? |
@kfcampbell I've opened a draft PR with a potential solution here: It simply adds in an empty for the missing If this seems like a viable path forwards, I'll look at building the module and testing it when I get the chance :-) (Untested currently hence the draft) |
I responded on the PR, which looks good! I can't wait to resolve this issue. |
@TheQueenIsDead and everyone else who contributed. The issue was fixed by release |
EDIT: was not using _v3. the pr was fine im not so sure that this works? I am on 5.16.0 and hit the nil issue, adding checks just gave me this
|
Terraform Version
v5.3.0
Affected Resource(s)
The issue occures when creating a new
github_branch_protection_v3
resource with attributes referenced fromgithub_branch_default
andgithub_branch_protection_v3
resources.Debug Output
Expected Behavior
The branch protection v3 resource should be created.
Actual Behavior
Terraform errors out with message above.
Steps to Reproduce
Step 1
Create a repo with terraform apply.
Step 2
Terraform apply the following change:
Important Factoids
This works up to GitHub provider version v5.2.0 without errors and errors in v5.3.0.
This seems to be linked to the go client update in the release diff where the API Client is updated as follows.
terraform-provider-github/vendor/github.com/google/go-github/v47/github/repos.go
Line 908 in 6773d80
From
To
References
The text was updated successfully, but these errors were encountered: