-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
ISSUE
When creating new repositories, with branch names [production, non-production, development], and setting the default_branch = "production", there are 422 errors.
Terraform:
private_repositories = {
myorg-gcp-00-bootstrap = {
advance_security = false
allow_auto_merge = true
default_branch = "production"
delete_head_on_merge = true
dependabot_security_updates = false
description = "Used to hold the bootstrap terraform for the GCP Organization"
has_vulnerability_alerts = true
homepage = ""
protected_branches = ["production", "development", "non-production"]
requires_web_commit_signing = true
topics = ["gcp", "infrastructure-as-code"]
}Error:
│ Error: PATCH https://api.github.com/repos/FociSolutions/bupa-gcp-02-environments: 422 Validation Failed [{Resource:Repository Field:default_branch Code:invalid Message:The branch production was not found. Please push that ref first or create it via the Git Data API.}]
│
│ with module.private_repositories["bupa-gcp-02-environments"].module.repository_base.github_branch_default.default_branch,
│ on ../repository_base/repository.tf line 98, in resource "github_branch_default" "default_branch":
│ 98: resource "github_branch_default" "default_branch" {
│ Metadata
Metadata
Assignees
Labels
No labels