From 418ef4f11aa9cff05cd651684ff2f36f7d99702a Mon Sep 17 00:00:00 2001 From: arnol377 Date: Tue, 20 Aug 2024 12:39:14 -0400 Subject: [PATCH] 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 + } + ) + } + ] +} +