Closed rhughes1 closed 2 weeks ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
I believe #1128 may have caused this because v5.19.0 works ok, but v5.20.0 wants to replace all my github_repository_file_resources
because the branch has changed from main => null.
However, providing the branch argument fixes this.
👋 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!
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