From 017d697f15e772acc770cc7f237ed3d9048f4494 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:18:04 -0700 Subject: [PATCH 1/7] Update data.tf --- data.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data.tf b/data.tf index 2502393..bbac47a 100644 --- a/data.tf +++ b/data.tf @@ -1 +1,3 @@ data "aws_region" "current" {} + +data "github_organization_teams" "all" {} From 59427f6a814717d48c9e0fa478c8c814ba8b9d3e Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:21:45 -0700 Subject: [PATCH 2/7] github_org_teams = local.github_organization_teams --- main.tf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/main.tf b/main.tf index e725af3..6283119 100644 --- a/main.tf +++ b/main.tf @@ -8,6 +8,7 @@ locals { "arnol377", "gomez385" ] + github_organization_teams = [ for team in data.github_organization_teams.teams : team.name ] } @@ -26,6 +27,7 @@ module "elastic_beanstalk" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } @@ -45,6 +47,7 @@ module "automation-repos" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } # terraform-repos @@ -62,6 +65,7 @@ module "csvd-org-management" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "external-actions" { @@ -78,6 +82,7 @@ module "external-actions" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "github-runner-images" { @@ -94,6 +99,7 @@ module "github-runner-images" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } @@ -114,6 +120,7 @@ module "centralized-actions" { collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers github_is_private = false + github_org_teams = local.github_organization_teams } # terraform-github-repo @@ -131,6 +138,7 @@ module "terraform-github-repo" { create_codeowners = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } @@ -151,6 +159,7 @@ module "elastic_beanstalk_java" { template_repo = "aws-beanstalk" template_repo_org = "CSVD" pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "elastic_beanstalk_php" { @@ -170,6 +179,7 @@ module "elastic_beanstalk_php" { template_repo = "aws-beanstalk" template_repo_org = "CSVD" pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "elastic_beanstalk_nodejs" { @@ -189,6 +199,7 @@ module "elastic_beanstalk_nodejs" { template_repo = "aws-beanstalk" template_repo_org = "CSVD" pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } @@ -207,6 +218,7 @@ module "test-statefile" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } @@ -227,6 +239,7 @@ module "elastic_beanstalk_docker" { template_repo = "aws-beanstalk" template_repo_org = "CSVD" pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "beanstalk-demo" { @@ -244,6 +257,7 @@ module "beanstalk-demo" { is_template = true collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "setup_terraform" { @@ -259,6 +273,7 @@ module "setup_terraform" { create_codeowners = false enforce_prs = false collaborators = local.collaborators + github_org_teams = local.github_organization_teams } module "setup_node" { @@ -274,6 +289,7 @@ module "setup_node" { create_codeowners = false enforce_prs = false collaborators = local.collaborators + github_org_teams = local.github_organization_teams } # ghe-runner @@ -290,4 +306,5 @@ module "ghe_runners" { create_codeowners = false enforce_prs = false collaborators = local.collaborators + github_org_teams = local.github_organization_teams } From 6b5a9dca8dcccabdf00603fa3a448ba6251011be Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:22:07 -0700 Subject: [PATCH 3/7] Update github-runners.tf --- github-runners.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github-runners.tf b/github-runners.tf index 74bce79..5c3032d 100644 --- a/github-runners.tf +++ b/github-runners.tf @@ -13,6 +13,7 @@ module "template_ecs_github_runners" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } module "csvd_ecs_github_runners" { @@ -29,4 +30,5 @@ module "csvd_ecs_github_runners" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams } From 26d2c0faaf9fd279bf0eec0b477afd2d2e9780b7 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:22:43 -0700 Subject: [PATCH 4/7] Update image-pipeline.tf --- image-pipeline.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/image-pipeline.tf b/image-pipeline.tf index 529720c..a60ba30 100644 --- a/image-pipeline.tf +++ b/image-pipeline.tf @@ -27,6 +27,7 @@ module "image_pipeline_repos" { enforce_prs = true collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams managed_extra_files = [ { path = ".github/workflows/s3_upload.yaml" @@ -49,6 +50,7 @@ module "asset_releases" { github_repo_description = "Terraform Workspace for publishing image-pipeline-assets" repo_org = "CSVD" name = "image-pipeline-asset-releases" + github_org_teams = local.github_organization_teams github_repo_topics = [ "terraform" ] @@ -66,6 +68,7 @@ module "aws_image_pipeline" { github_repo_description = "Terraform Workspace for creating and managing AWS Image Pipelines" repo_org = "CSVD" name = "aws-image-pipeline" + github_org_teams = local.github_organization_teams github_repo_topics = [ "terraform" ] @@ -109,6 +112,7 @@ module "terraform_aws_image_pipeline" { github_repo_description = "Terraform Module that creates codepipeline and codebuild jobs and other resources for building and deploying images" repo_org = "CSVD" name = "terraform-aws-image-pipeline" + github_org_teams = local.github_organization_teams github_repo_topics = [ "terraform" ] From 34e38a0db095cc7272e2c27f6b34a5bca1746f59 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:23:06 -0700 Subject: [PATCH 5/7] Update morpheus.tf --- morpheus.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/morpheus.tf b/morpheus.tf index b8abed3..170f470 100644 --- a/morpheus.tf +++ b/morpheus.tf @@ -10,6 +10,7 @@ module "morpheus_repos" { source = "HappyPathway/repo/github" #github_codeowners_team = "CSVD" github_repo_description = "Repo for morpheus cloud" + github_org_teams = local.github_organization_teams repo_org = "CSVD" name = each.value github_repo_topics = [ From ae178098ac05c3fdb0384d2bbd9ebb661dd53729 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:23:27 -0700 Subject: [PATCH 6/7] Update sandbox.tf --- sandbox.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/sandbox.tf b/sandbox.tf index 4919232..e80f158 100644 --- a/sandbox.tf +++ b/sandbox.tf @@ -19,6 +19,7 @@ module "sandbox" { create_codeowners = false enforce_prs = false collaborators = { "arnol377" : "admin" } + github_org_teams = local.github_organization_teams managed_extra_files = [ { path = ".github/workflows/terraform-plan.yaml" From cae9f72de773ae7210b7018d23f720ce1ed8afa0 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Tue, 24 Sep 2024 09:24:17 -0700 Subject: [PATCH 7/7] Update main.tf --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 6283119..174bc89 100644 --- a/main.tf +++ b/main.tf @@ -8,7 +8,7 @@ locals { "arnol377", "gomez385" ] - github_organization_teams = [ for team in data.github_organization_teams.teams : team.name ] + github_organization_teams = data.github_organization_teams.teams }