[BUG]: changing branch name with protection rules set fails
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- go, terraform
- Área
- devops, infrastructure
Línea de trabajo
Comienza con las implementaciones de los recursos github_branch y github_branch_protection y reproduce la configuración de Terraform proporcionada, rastreando al mismo tiempo el ID global de la regla de protección después de renombrar una rama. Se considera terminado cuando renombrar una rama protegida se aplica correctamente sin el error de global-ID y la protección existente sigue siendo correcta.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected Behavior
on changing branch name that has protection rules set by terraform, its expected for the apply to work normally
Actual Behavior
branch name changes, however, protection rule modification fail with error : Could not resolve to a node with the global id of xxxxxxx
Terraform Version
Terraform v1.15.7
on linux_amd64
- provider registry.terraform.io/hashicorp/github v6.13.0
GitHub Installation Type
- GitHub.com (Free, Pro, or Team)
- GitHub Enterprise Server (on-premises)
- GitHub Enterprise Cloud with Personal Accounts (github.com)
- GitHub Enterprise Cloud with Managed Users/EMU (github.com)
- GitHub Enterprise Cloud with Data Residency (*.ghe.com)
- I don't know
Affected Resource(s)
- github_branch_protection
- github_branch
Terraform Configuration Files
resource "github_repository" "terraform_lab" {
name = "tf-lab-practice"
description = "Can I change this?"
visibility = "public"
auto_init = true
allow_merge_commit = true
allow_squash_merge = true
topics = ["terraform", "iac"]
}
resource "github_branch" "terraform_lab" {
repository = github_repository.terraform_lab.name
branch = "master3"
}
resource "github_branch" "terraform_lab_dev" {
repository = github_repository.terraform_lab.name
branch = "dev3"
}
resource "github_branch_default" "terraform_lab" {
repository = github_repository.terraform_lab.name
branch = github_branch.terraform_lab.branch
}
resource "github_branch_protection" "terraform_lab" {
repository_id = github_repository.terraform_lab.name
pattern = github_branch_default.terraform_lab.branch
enforce_admins = true
allows_deletions = true
required_pull_request_reviews {
require_code_owner_reviews = true
dismiss_stale_reviews = true
restrict_dismissals = true
required_approving_review_count = 1
}
}
resource "github_branch_protection" "terraform_lab_dev" {
repository_id = github_repository.terraform_lab.name
pattern = github_branch.terraform_lab_dev.branch
enforce_admins = true
allows_deletions = true
required_pull_request_reviews {
require_code_owner_reviews = true
dismiss_stale_reviews = true
restrict_dismissals = true
required_approving_review_count = 1
}
}
output "repo_data" {
value = github_repository.terraform_lab
}
output "default_branch_data" {
value = github_branch_default.terraform_lab
}
terraform {
required_version = ">= 1.12.2" # Replace with your installed version
required_providers {
github = {
source = "hashicorp/github"
version = "~> 6.13"
}
}
}
provider "github" {}
Steps to Reproduce
export GITHUB_TOKEN
terraform apply #the code provided
#change any branch name
terraform apply
Debug Output
github_branch.terraform_lab_dev: Modifying... [id=tf-lab-practice:dev2]
github_branch_protection.terraform_lab: Modifying... [id=BPR_kwDOTcwWwc4Ey13a]
github_branch.terraform_lab_dev: Modifications complete after 4s [id=tf-lab-practice:dev3]
github_branch_protection.terraform_lab_dev: Modifying... [id=BPR_kwDOTcwWwc4Ey13b]
github_branch_protection.terraform_lab: Modifications complete after 8s [id=BPR_kwDOTcwWwc4Ey13a]
╷
│ Error: Could not resolve to a node with the global id of 'BPR_kwDOTcwWwc4Ey13b'.
│
│ with github_branch_protection.terraform_lab_dev,
│ on main.tf line 44, in resource "github_branch_protection" "terraform_lab_dev":
│ 44: resource "github_branch_protection" "terraform_lab_dev" {
│
╵
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- Go
- Estrellas
- 1.2k
- Forks
- 1.1k
- Merge medio
- 9 h 41 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de integrations/terraform-provider-github
-
[DOCS]: enforce_admins description understates what it covers and omits push restrictionsPosiblemente ocupada @dav-tb la tomó hace 1 día. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
integrations/terraform-provider-github#3707 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[FEAT]: Add ruleset bypass actor type `OrganizationRole`Posiblemente ocupada @marcencov la tomó hace 16 días. AbiertoStatus: Triage Type: Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
integrations/terraform-provider-github#3674 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Type: Bug Upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
integrations/terraform-provider-github#3660 · 2 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
github_organization_custom_properties Read doesn't handle 404, breaking recovery after deletionPosiblemente ocupada @mkushakov la tomó hace 246 días. Abiertor/organization_custom_properties Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
integrations/terraform-provider-github#3641 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Status: Triage Type: Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
integrations/terraform-provider-github#3613 · 1 comentario · 3 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de integrations/terraform-provider-github
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
YoanWai/agent-manager#948 ·
Los mantenedores suelen responder en 1 día
-
area: platform priority: normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
margince/margince#9851 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Headerless responses block while skipping duplicate status linesPosiblemente ocupada @mynhe la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
projectdiscovery/rawhttp#554 ·
-
type:chore
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
nightgauge/nightgauge#2793 ·
Los mantenedores suelen responder en 1 día
-
stage-fail
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
siyuan-note/bazaar#2447 ·
Los mantenedores suelen responder en 1 día