Skip to content

Instantly share code, notes, and snippets.

@koozz
Created November 10, 2021 07:49
Show Gist options
  • Save koozz/c87d348f8f7c294ed7bbd9ea17bb0a6a to your computer and use it in GitHub Desktop.
Save koozz/c87d348f8f7c294ed7bbd9ea17bb0a6a to your computer and use it in GitHub Desktop.
Teams-as-Code consumer snippet
locals {
users = [
for f in fileset(path.module, "../persons/*.yml") : yamldecode(file(f)).person
]
teams = [
for f in fileset(path.module, "../teams/*.yml") : yamldecode(file(f)).team
]
roles = [
for f in fileset(path.module, "../roles/*.yml") : yamldecode(file(f)).role
]
}
module "teams-as-code" {
source = "git::git@github.com:org/repo.git//services/teams-as-code?ref=v1.0.0"
users = local.users
teams = local.teams
roles = local.roles
user_ad_domain = "corporate.net"
team_ad_prefix = "CompanyDepartmentPrefix-Team"
role_ad_prefix = "CompanyDepartmentPrefix-Role"
github_parent_team = 123456
global_ad_roles = ["CommonDepartmentRoleForEveryone"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment