github_repository_file fails to refresh when branch is deleted #833
Labels
r/repository_file
Status: Stale
Used by stalebot to clean house
Type: Bug
Something isn't working as documented
This issue is most likely to appear if you rename the default branch
master
->main
, for example. The state refers to the old branch (master
) which is now deleted.Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Please provide a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
https://gist.github.com/adborden/ab50ceb300daeedee2575cdd0ab18c0f
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
What should have happened?
terraform refresh
should complete successfully.terraform plan
should show the resource as being in need of an update.Actual Behavior
What actually happened?
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
github_repository_file.issue_template
'sbranch
to an existing branch (test-deleted
).terraform apply
test-deleted
branch in GitHub, changebranch
to an existing branch e.g.main
terraform refresh
Important Factoids
Is there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: