From 199cb29dfebea3ded0a45194683c944d80117092 Mon Sep 17 00:00:00 2001 From: Ivan Pavlovic Date: Mon, 28 Sep 2026 12:59:51 +0100 Subject: [PATCH] =?UTF-8?q?docs:=20rename=20runbook=20=E2=80=94=20note=20n?= =?UTF-8?q?ested=20teams=20live=20at=20github=5Fteam.child=5Fteam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/renaming-teams-and-members.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/renaming-teams-and-members.md b/docs/renaming-teams-and-members.md index fff5003..84c7340 100644 --- a/docs/renaming-teams-and-members.md +++ b/docs/renaming-teams-and-members.md @@ -73,14 +73,18 @@ Prepare them now; merge neither yet. ### 2. Find every affected state address ```bash -terraform state list | grep -E 'github_team\.team|github_team_membership\.membership' +terraform state list | grep -E 'github_team\.(team|child_team)|github_team_membership\.membership' ``` -You are looking for `github_team.team["Old Name"]` plus one `github_team_membership.membership["/Old Name"]` for every member who lists the team in `organisation/members.yaml`. +You are looking for the team resource plus one `github_team_membership.membership["/Old Name"]` for every member who lists the team in `organisation/members.yaml`. + +> [!IMPORTANT] +> A **nested** team (one with a `parent`) lives at `github_team.child_team["Old Name"]`, not `github_team.team["Old Name"]` — top-level teams are `github_team.team`, nested teams are `github_team.child_team`. Use the address the team actually has in the move commands below. Everything else about the rename is identical. ### 3. Move them to the new key ```bash +# use github_team.child_team[...] on both sides for a nested team terraform state mv 'github_team.team["Old Name"]' 'github_team.team["New Name"]' ```