Repository navigation
Description
Expected Behavior
github_repository_file should continue to support valid GitHub repository file paths that include a literal colon (:) in the filename, such as repro/example:one.yaml.
After creating a file at exactly repro/example:one.yaml with provider 6.11.0, upgrading to 6.11.1 should still allow refresh and plan to succeed.
Actual Behavior
After upgrading integrations/github from 6.11.0 to 6.11.1, terraform plan / tofu plan fails during refresh for existing github_repository_file resources whose file path contains :.
The provider returns:
Error: failed to build ID: unescaped separator in non-final part "repro/example:one.yaml"This appears to come from github_repository_file building its resource ID with buildID(repo, file, branch), while buildID rejects : in all non-final parts.
Terraform Version
OpenTofu v1.11.5
on linux_amd64
+ provider registry.terraform.io/integrations/github v6.11.1Affected Resource(s)
github_repository_file
Terraform Configuration Files
terraform {
required_providers {
github = {
source = "integrations/github"
version = "6.11.1"
}
}
}
variable "github_token" {
type = string
sensitive = true
}
variable "owner" {
type = string
}
variable "repository" {
type = string
}
provider "github" {
token = var.github_token
owner = var.owner
}
resource "github_repository_file" "marker" {
repository = var.repository
branch = "main"
file = "repro/README.md"
commit_message = "create repro directory"
overwrite_on_create = true
content = "Files in this directory are managed by Terraform."
}
resource "github_repository_file" "colon_filename" {
repository = var.repository
branch = "main"
file = "repro/example:one.yaml"
commit_message = "manage colon filename repro"
overwrite_on_create = true
content = yamlencode({
apiVersion = "v1"
kind = "ConfigMap"
metadata = {
name = "example-one"
}
})
}Steps to Reproduce
- Create an empty test repository with a
mainbranch. - Apply the configuration above with
integrations/github6.11.0so the resource manages the literal pathrepro/example:one.yamland stores it in state. - Change only the provider version to
6.11.1. - Run
terraform planortofu planagain. - Observe refresh fail before planning completes.
Debug Output
Error: failed to build ID: unescaped separator in non-final part "repro/example:one.yaml"In my original production case, the same failure occurred on existing file paths like:
trivial-apps/infra-misc/kyverno/irsa/tf/nes-backstage:nes-backstage.yaml
trivial-apps/infra-misc/kyverno/irsa/tf/ack:ack-rds-controller.yaml
trivial-apps/infra-misc/kyverno/irsa/tf/kube-system:s3-csi-driver-sa.yamlPanic Output
N/A
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
github-actions commentedon Apr 13, 2026
👋 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 labeled with
Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀