Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions terraform/production/org.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ admins = [
"williln",
]

ops_team = [
"cunla",
"ryancheley",
"Stormheg",
"tim-schilling",
"williln",
]

# Design members
designers = [
"akshayvinchurkar",
Expand Down Expand Up @@ -101,10 +109,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 team with moderator permissions in the org."
# Use maintainers for organizational teams
maintainers = [
"cunla",
"ryancheley",
"Stormheg",
"tim-schilling",
"williln",
]
}
"operations" = {
description = "django-commons operations team with admin permissions in the org."
# Use maintainers for organizational teams
maintainers = [
"cunla",
Expand Down
3 changes: 2 additions & 1 deletion terraform/resources-org.tf
Original file line number Diff line number Diff line change
@@ -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.ops_team, var.members)
}

output "invalid_users" {
Expand All @@ -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.ops_team : 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) }
)
}
Expand Down
7 changes: 6 additions & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's rename this? admins implies permissions, and we want to reduce the admins' permissions over the GitHub org (not in terms of decisions-making).

So perhaps board/strategy_team?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're likely to bikeshed on a name in my opinion. I'd be against anything with board or council in the name to avoid conflicts with the existing DSF entities. Strategy doesn't fit the bill in my opinion since that sounds a bit like they just do thought-experiments to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe decision-makers? I am fine leaving it as admins though.

type = set(string)
}

variable "ops_team" {
description = "A set of users who have operational permissions to add to the organization"
type = set(string)
}

Expand Down