Open unique-dominik opened 1 year ago
We solved it like this:
locals {
admins = ["peter", "mary"]
teams = {
ops = {
members = ["peter", "paul"]
# [...]
}
devs = {
members = ["mary", "mike"]
# [...]
}
}
}
module "organization" {
source = "mineiros-io/organization/github"
admins = local.admins
members = setsubtract(flatten(local.teams[*].members), local.admins) # admins can't be regular members
}
Issue
Question
Sorry to bother, I see you actually have like no issues but I am stuck (in my head I assume). How am I supposed to model that an admin is also a member? Or shall I just let GH handle membership? If I appoint an admin as member, his member state always wins. Maybe I am just blind. But the teams we then need in the repo module of yours to assign push permissions.
What am I understanding wrong?