-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
60 lines (52 loc) · 1.72 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
terraform {
backend "s3" {
bucket = "homebrew-terraform-state"
key = "terraform.tfstate"
region = "us-east-1"
}
}
terraform {
required_providers {
github = {
source = "integrations/github"
version = "~> 6.0"
}
}
}
locals {
# these people can't have their membership managed by OpenTofu because they are Billing Managers in GitHub
unmanagable_members = ["p-linnane", "issyl0", "colindean", "MikeMcQuaid", "BrewSponsorsBot"]
}
module "dnsimple" {
source = "./dnsimple"
}
module "github" {
source = "./github"
teams = var.teams
admins = var.github_admins
unmanagable_members = local.unmanagable_members
}
locals {
emails = nonsensitive({ for username, email in module.github.member_emails : username => lookup(var.email_overrides, username, email) })
}
module "aws" {
source = "./aws"
teams = {
Ops = { for username in var.teams.maintainers.ops : username => local.emails[username] if lookup(local.emails, username, "") != "" }
Security = { for username in var.teams.security : username => local.emails[username] if lookup(local.emails, username, "") != "" }
PLC = { for username in var.teams.plc : username => local.emails[username] if lookup(local.emails, username, "") != "" }
Analytics = { for username in var.teams.maintainers.analytics : username => local.emails[username] if lookup(local.emails, username, "") != "" }
}
}
module "google-cloud" {
source = "./google-cloud"
ops = module.github.ops
tsc = module.github.tsc
plc = module.github.plc
}
module "google-mailinglists" {
source = "./google-mailinglists"
ops = module.github.ops
tsc = module.github.tsc
plc = module.github.plc
}