From 418ef4f11aa9cff05cd651684ff2f36f7d99702a Mon Sep 17 00:00:00 2001 From: arnol377 Date: Tue, 20 Aug 2024 12:39:14 -0400 Subject: [PATCH 1/3] adding a workspace for managing service accounts --- main.tf | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/main.tf b/main.tf index 6c72d56..5e094db 100644 --- a/main.tf +++ b/main.tf @@ -206,3 +206,45 @@ module "ghe_runners" { collaborators = local.collaborators } +module "aws-service-accounts" { + source = "git@github.e.it.census.gov:CSVD/terraform-github-repo" + github_repo_description = "Manage Repo Specific Runners" + repo_org = "arnol377" + name = "aws-service-accounts" + github_repo_topics = [ + "terraform" + ] + force_name = true + github_is_private = false + create_codeowners = false + enforce_prs = true + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers + managed_extra_files = [ + { + path = ".github/workflows/terraform-plan.yaml" + content = templatefile( + "${path.module}/workflows/terraform-plan.yaml.tpl", + { + repo_name = "aws-image-pipeline", + directory = null + git_owner = { + name = "arnol377" + email = "david.j.arnold.jr@census.gov" + } + } + ) + }, + { + path = ".github/workflows/terraform-apply.yaml" + content = templatefile( + "${path.module}/workflows/terraform-apply.yaml.tpl", + { + repo_name = "aws-image-pipeline", + directory = null + } + ) + } + ] +} + From 5c4e84048231cf2c7b8ed86bed331a00e6c2d961 Mon Sep 17 00:00:00 2001 From: arnol377 Date: Tue, 20 Aug 2024 12:40:18 -0400 Subject: [PATCH 2/3] Autoformatting TF Code --- main.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.tf b/main.tf index 5e094db..fb66bd7 100644 --- a/main.tf +++ b/main.tf @@ -214,13 +214,13 @@ module "aws-service-accounts" { github_repo_topics = [ "terraform" ] - force_name = true - github_is_private = false - create_codeowners = false - enforce_prs = true - collaborators = local.collaborators + force_name = true + github_is_private = false + create_codeowners = false + enforce_prs = true + collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers - managed_extra_files = [ + managed_extra_files = [ { path = ".github/workflows/terraform-plan.yaml" content = templatefile( From 759210328a49ee28047ae6d87ada682d1601fa1e Mon Sep 17 00:00:00 2001 From: arnol377 Date: Tue, 20 Aug 2024 12:41:51 -0400 Subject: [PATCH 3/3] fixing module source --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 5e094db..58e2bbf 100644 --- a/main.tf +++ b/main.tf @@ -207,7 +207,7 @@ module "ghe_runners" { } module "aws-service-accounts" { - source = "git@github.e.it.census.gov:CSVD/terraform-github-repo" + source = "HappyPathway/repo/github" github_repo_description = "Manage Repo Specific Runners" repo_org = "arnol377" name = "aws-service-accounts"