Skip to content
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

[BUG]: github_branch_protection allow_force_pushes permanent diff when force_push_bypassers is specified #2054

Closed
1 task done
derhally opened this issue Dec 10, 2023 · 0 comments · Fixed by #2129
Closed
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@derhally
Copy link

Expected Behavior

Value for allows_force_pushes should remain constant after apply even if force_push_bypassers are set

Actual Behavior

allows_force_pushes sticks to false even though it is shows enabled in the GitHub console

image

image

Terraform Version

Terraform v1.3.8
on linux_amd64

  • provider registry.terraform.io/integrations/github v5.29.0

I tested this with terraform 1.6 and the github provider vs 5.52.0 as well.

Affected Resource(s)

github_branch_protection

Terraform Configuration Files

resource "github_branch_protection" "this" {
  repository_id = github_repository.this.node_id

  pattern = "main"
  allows_force_pushes             = true
  force_push_bypassers            = [ "org/team1" ]
}

Steps to Reproduce

Run terraform apply

Then run terraform plan and you should see terraform trying to change allows_force_pushes from false to true

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@derhally derhally added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Dec 10, 2023
@nickfloyd nickfloyd added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jan 4, 2024
@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jan 4, 2024
bpaquet added a commit to bpaquet/terraform-provider-github that referenced this issue Feb 7, 2024
nickfloyd added a commit that referenced this issue Feb 13, 2024
fix doc for #2054: Clarify how allows_force_pushes is working
@github-project-automation github-project-automation bot moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Active Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants