Skip to content

[BUG]: Unable to import a github_repository_file from default branch with provider 6.11.0 #3161

@mymasse

Description

@mymasse

Expected Behavior

Running the following, should import a file from the default branch:

terraform import 'github_repository_file.this' <REPO>/<FILE_PATH>

Actual Behavior

Returns the follwing:

Error: invalid ID specified. Supplied ID must be written as <repository>/<file path>:<branch>. unexpected ID format ("<REPO>/<FILE_PATH>"); expected 2 parts separated by ":"

Terraform Version

Terraform v1.14.4
on linux_amd64

  • provider registry.terraform.io/integrations/github v6.11.0

Affected Resource(s)

  • github-repository-file

Terraform Configuration Files

resource "github_repository_file" "this" {
  repository = <REPO>
  file       = <FILE_PATH>
  content = ""
  commit_message      = "chore: update file"
  overwrite_on_create = true
}

Steps to Reproduce

terraform import 'github_repository_file.this' <REPO>/<FILE_PATH>

Debug Output

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions