-
Notifications
You must be signed in to change notification settings - Fork 772
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
unable to update branch_protections for github repos #1147
Comments
I was facing the same issue a few moments ago. Try adding context. |
@balusarakesh if you don't need to enable checks, then you can try to provide
|
I'm not sure if this works, here's the full (non-working) example:
I'm also a bit puzzled what broke here (why did this surface now; did GitHub update their API on this or what). The best option for us to get this sorted seems to just create the required_status_checks block with dynamic now - but only when the "contexts" have been configured - as otherwise - for reason X - GitHub gives the error. But, we should be able to set the "strict" without the "contexts" - so - it seems to be a bug... |
FYI: it's not the
|
I'm also experiencing this issue at my organisation, out of no-where much like @iniinikoski. Has anyone had much success at a workaround or fix? Unsure if this is related, but in the GitHub API docs under the "Body Parameters" section, it states that the |
Having the same issue over here. Apparently it worked fine 21 days ago from our terraform/CI logs... |
I'm also seeing this issue. My data point that I can contribute is that updated my pinned version for the provider from version |
We downgraded the provider to |
This seems to be a problem with |
Actually, it seems like update: actually, there are 2 versions of the resource, one uses |
@luisdavim which version can we use meanwhile this gets resolved? I'm using |
I think |
Can confirm, we're using |
Downgrading to a lower version doesn't seem like a good long term solution. Are there any plans to fix this in later versions? |
This should already be fixed in github_branch_protection_v3 since this PR was merged in and released. @luisdavim for github_branch_protection, the githubv4 schema has been updated a couple of times recently. Do you mind checking if the relevant |
This is not fixed. Passing null for EDIT: when passing
Seems like the provider is perhaps converting the empty list to nil? I tried as well by explicitly setting
This is on v5.7.0 of the provider using the |
Looks like this is related to #1307, which was caused by an upstream change in google/go-github attempting to fix this issue in the provider. Perhaps an upstream revert is our best bet? |
We have resolved this issue on a few dozen repositories by switching from |
I'm facing the same issue using v5.2.0 and digging it I found out an important point that I haven't seen mentioned in this ticket: the Trace logging the terraform run, I can see an initial GET on the branch protection rule returning Any following So, whether |
This is a good workaround, though it's worth noting that the V4 (GraphQL) API does not support fine-grained tokens at the moment, which is an issue for those that have enabled the recent "Disallow classic PAT's" toggle: |
This seems to be a dupe of #1307, which a fix is in-progress for. I'm going to close this out and we should continue further discourse there. |
…s workaround before changing the provider version
* known issue (integrations/terraform-provider-github#1147), trying this workaround before changing the provider version * change to v4 graphql branch protection
still get the same issue in v6.2.1
|
Hi there,
We were trying to enable
enforce_admins = true
and we see a TF plan like the following but when we apply we get an error. As you can see below there are no changes torequired_status_checks
but we are not able to apply it.Terraform Version
1.0.9
v4.24.1
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
unfortunately I'm not allowed to share full debug output due to company policy, here's some relevant debug logs:
Expected Behavior
Actual Behavior
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
The text was updated successfully, but these errors were encountered: