[BUG]: github_branch_default
resource fails on creation with rename
set to true
#1904
Open
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
Expected Behavior
If I have the following terraform config ...
... I expect the
github_default_branch
resource being created without issues.Actual Behavior
The
terraform plan
succeeds without issues BUT on theterraform apply
aka the creation of thegithub_default_branch
resource an API call is made to rename the default branch frommain
tomain
. This API call fails with status code422
.Doing an API call to rename
main
tomain
does not really make sense, fails and is an additional call which is not required.A small condition only doing the rename-call if it makes sense would fix the issue aka
if current_name != new_name
.See:
Terraform Version
Terraform v1.5.7
on linux_amd64
Affected Resource(s)
Terraform Configuration Files
No response
Steps to Reproduce
No response
Debug Output
No response
Panic Output
Code of Conduct
The text was updated successfully, but these errors were encountered: