[BUG]: github_repository_file import not setting branch argument correctly #2020
Labels
Status: Stale
Used by stalebot to clean house
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
Expected Behavior
Expected to see the
branch
argument populated with the Terraform state file and that the plan would not force replace the resource.Actual Behavior
The Terraform state file recorded the
branch
as null. When aterraform plan
occurs after the import, Terraform wants to force replace the resource.Looking at the import logic, it only seems to set the branch if you import specifying the branch (ie with a
:
). However, when I do specify the branch within the import (ietest-import/README:main
as the ID in the CLI or import configuration) it still shows as a force replacement.The logic should set the branch if the default branch is being used explicitly.
Terraform Version
Terraform v1.6.3
integrations/github v5.42.0
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
terraform import github_repository_file.readme testorg/README.md
or the Terraform import configuration.terraform plan
Debug Output
No response
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: