terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

Remove a parent team is destructive

Open jycamier opened this issue 2 years ago • 0 comments

Let's talk about teams.

resource "github_team" "parent" {
  name           = "Team Parent"
  privacy        = "closed"
}

resource "github_team" "child_a" {
  name           = "Child A"
  parent_team_id = github_team.parent.id
  privacy        = "closed"
}

resource "github_team" "child_b" {
  name           = "Child B"
  parent_team_id = github_team.parent.id
  privacy        = "closed"
}

When we remove a team parent and the associated relation, the children teams are automatically removed due to a Github feature. In this exemple : if a remove the code of the github_team.parent, the teams Child A and Child B are removed, nevermind terraform code.

jycamier avatar Aug 24 '22 13:08 jycamier