terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

[BUG]: github_branch_protection_v3 - invalid bypass_pull_request_allowances

Open RobinOlofsson opened this issue 10 months ago • 2 comments

Expected Behavior

I expect an empty bypass_pull_request_allowances to do nothing. I set it in a module, so i need the block to be there and contain values sometimes.

Actual Behavior

empty bypass_pull_request_allowances results in an error saying "Error: invalid bypass_pull_request_allowances" when running apply.

Terraform Version

OpenTofu v1.9.0 on darwin_arm64

  • provider registry.opentofu.org/integrations/github v6.6.0

Affected Resource(s)

  • github_branch_protection_v3

Terraform Configuration Files


Steps to Reproduce

No response

Debug Output


Panic Output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

RobinOlofsson avatar Mar 04 '25 14:03 RobinOlofsson

I managed to work around it with a bunch of conditions so that the block is never outputted if i don't have to output it, but i find it a bit odd that an empty list causes an error after apply. If i rerun apply a second time, after it seemingly failed, i just get "No changes" .

RobinOlofsson avatar Mar 05 '25 07:03 RobinOlofsson

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Dec 06 '25 02:12 github-actions[bot]