Created
August 22, 2024 21:51
-
-
Save kerryhatcher/afb110dcc5c76e3ae713ad529ad3a190 to your computer and use it in GitHub Desktop.
GHEC EMU Managment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "github_external_groups" "example_external_groups" {} | |
locals { | |
local_groups = data.github_external_groups.example_external_groups | |
} | |
output "groups" { | |
value = local.local_groups | |
} | |
resource "github_team" "some_team" { | |
for_each = { for g in local.local_groups.external_groups : g.group_name => g } | |
name = each.value.group_name | |
description = "Some cool team" | |
privacy = "closed" | |
lifecycle { | |
#prevent_destroy = true | |
} | |
} | |
resource "github_emu_group_mapping" "example_emu_group_mapping" { | |
for_each = { for g in local.local_groups.external_groups : g.group_name => g } | |
team_slug = each.value.group_name | |
group_id = each.value.group_id | |
depends_on = [github_team.some_team] | |
lifecycle { | |
#prevent_destroy = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment