-
Notifications
You must be signed in to change notification settings - Fork 949
Branch protection rule failed to be created with new format Github repository node_id #908
Copy link
Copy link
Closed
Labels
Status: Needs infoFull requirements are not yet known, so implementation should not be startedFull requirements are not yet known, so implementation should not be startedType: BugSomething isn't working as documentedSomething isn't working as documentedr/branch_protection
Description
With Github migrating the repository's GraphQL global node ID to new format, branch protection rule resource cannot be created with node_id because the new format of node ID is no longer encoded by Base64.
Branch protection rule setup with repository name is still working correctly without being affected.
Terraform Version
0.14.11
Affected Resource(s)
- github_branch_protection
Terraform Configuration Files
resource "github_repository" "new_example_repo" {
name = "new-example-repo"
description = "New Example Repo"
}
resource "github_branch_protection" "example" {
repository_id = github_repository.new_example_repo.node_id
pattern = "main"
enforce_admins = true
allows_deletions = true
}Expected Behavior
Branch protection rule should be created in the new repository.
Actual Behavior
Error reported as following:
Error: Could not resolve to a Repository with the name 'owner/R_xxXXXXxxXx'.
on main.tf line 7, in resource "github_branch_protection" "example":
7: resource "github_branch_protection" "example" {
Steps to Reproduce
terraform apply
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: Needs infoFull requirements are not yet known, so implementation should not be startedFull requirements are not yet known, so implementation should not be startedType: BugSomething isn't working as documentedSomething isn't working as documentedr/branch_protection
Type
Projects
Status
✅ Done