diff --git a/terraform/production/org.tfvars b/terraform/production/org.tfvars index 8b674e3..28bb1f6 100644 --- a/terraform/production/org.tfvars +++ b/terraform/production/org.tfvars @@ -7,6 +7,14 @@ admins = [ "williln", ] +super_admins = [ + "cunla", + "ryancheley", + "Stormheg", + "tim-schilling", + "williln", +] + # Design members designers = [ "akshayvinchurkar", @@ -113,10 +121,23 @@ members = [ "viscofuse", "Zakui", ] - organization_teams = { + # This team should be enabled as moderators which can't be configured + # via the GitHub Terraform integration. + # https://github.com/organizations/django-commons/settings/moderators "Admins" = { - description = "django-commons administrators" + description = "Django Commons administrators. This team is responsible for the overall management of the organization." + # Use maintainers for organizational teams + maintainers = [ + "cunla", + "ryancheley", + "Stormheg", + "tim-schilling", + "williln", + ] + } + "super-admins" = { + description = "Django Commons super administrators. This team is responsible for performing privileged operations." # Use maintainers for organizational teams maintainers = [ "cunla", diff --git a/terraform/resources-org.tf b/terraform/resources-org.tf index a18596f..8d37f48 100644 --- a/terraform/resources-org.tf +++ b/terraform/resources-org.tf @@ -1,7 +1,7 @@ # GitHub Membership Resource # https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership data "github_users" "users" { - usernames = setunion(var.admins, var.members) + usernames = setunion(var.admins, var.super_admins, var.members) } output "invalid_users" { @@ -11,6 +11,7 @@ output "invalid_users" { locals { users = merge( { for user in var.admins : user => "admin" if contains(data.github_users.users.logins, user) }, + { for user in var.super_admins : user => "admin" if contains(data.github_users.users.logins, user) }, { for user in var.members : user => "member" if contains(data.github_users.users.logins, user) } ) } diff --git a/terraform/variables.tf b/terraform/variables.tf index 108ed16..6d7e0be 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -2,7 +2,12 @@ # https://www.terraform.io/language/values/variables variable "admins" { - description = "A set of admins to add to the organization" + description = "A set of users who are admins to add to the organization" + type = set(string) +} + +variable "super_admins" { + description = "A set of users who have operational permissions to add to the organization" type = set(string) }