[BUG]: github_repository_environment - no terraform diff when resetting deployment branch policies via GitHub UI #1955
Labels
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
Expected Behavior
I set my code as follows and apply - this works.
If I update the deployment branch policy in GitHub UI to
no restriction
, then re-apply I expect terraform to show a diff and reset the deployment branch policy to that of the terraform code.Actual Behavior
Terraform does not reset the deployment branch policy.
Instead it reports no diff.
The statefile still shows the deployment branch policy as
"protected_branches": true
The same scenario occurs with the
custom_branch_policies
Looks like there is various bad logic in this resource with regards to the deployment branch policies.
Terraform Version
Terraform v1.6.0
on linux_amd64
Affected Resource(s)
github_repository_environment
Terraform Configuration Files
Steps to Reproduce
Reset policy as shown in GitHub UI:
terraform apply
and there will be no diff shown.State file still shows
"protected_branches": true
Debug Output
No response
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: