Closed gh-risharma closed 5 months ago
The 6.0.0 release modified those two args into a new block.
https://github.com/integrations/terraform-provider-github/pull/2045 https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection#restrict-pushes
This isn't a bug, it's a breaking change in v6 as bradam12 says, to resolve #594.
Change your code from
resource "github_branch_protection" "example" {
push_restrictions = []
blocks_creations = false
}
to
resource "github_branch_protection" "example" {
restrict_pushes {
blocks_creations = false
}
}
This issue should be closed @kfcampbell
👍 thanks @georgekaz
Expected Behavior
Earlier the job ran successfully with the same argument mentioned in github_branch_protection resource
Actual Behavior
But now its failing with the above error.
Terraform Version
1.7.4
Affected Resource(s)
-github_branch_protection
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct