terraform-provider-github
terraform-provider-github copied to clipboard
Remove a parent team is destructive
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.