From 87f3d9c3e8ba783bbdfe85dd478afecce36938f0 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Fri, 20 Sep 2024 14:14:28 -0700 Subject: [PATCH] Action prs (#15) * adding a few repos * Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 2 +- github-runners.tf | 32 +++++++++++++++ image-pipeline.tf | 10 ++--- main.tf | 57 +++++++++++++++++++++++++-- 4 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 github-runners.tf diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 4684893..13dcdbe 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -12,7 +12,7 @@ jobs: # This workflow contains a single job called "build" Plan: # The type of runner that the job will run on - runs-on: [ automation-repos ] + runs-on: [ "229685449397" ] env: AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" AWS_ACCESS_KEY_ID: "${{ vars.AWS_ACCESS_KEY_ID }}" diff --git a/github-runners.tf b/github-runners.tf new file mode 100644 index 0000000..74bce79 --- /dev/null +++ b/github-runners.tf @@ -0,0 +1,32 @@ +module "template_ecs_github_runners" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating Github Runners" + repo_org = "arnol377" + name = "template-ecs-github-runners" + github_repo_topics = [ + "terraform" + ] + is_template = true + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers +} + +module "csvd_ecs_github_runners" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating Github Runners" + repo_org = "arnol377" + name = "csvd-ecs-github-runners" + github_repo_topics = [ + "terraform" + ] + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers +} diff --git a/image-pipeline.tf b/image-pipeline.tf index 8a3a8f3..529720c 100644 --- a/image-pipeline.tf +++ b/image-pipeline.tf @@ -17,7 +17,7 @@ module "image_pipeline_repos" { source = "HappyPathway/repo/github" #github_codeowners_team = "CSVD" github_repo_description = "Template repo for windows image pipelines" - repo_org = "arnol377" + repo_org = "CSVD" name = each.value github_repo_topics = [ "terraform" @@ -44,10 +44,10 @@ module "image_pipeline_repos" { # image-pipeline-asset-releases module "asset_releases" { - source = "git@github.e.it.census.gov:CSVD/terraform-github-repo" + source = "HappyPathway/repo/github" #github_codeowners_team = "CSVD" github_repo_description = "Terraform Workspace for publishing image-pipeline-assets" - repo_org = "arnol377" + repo_org = "CSVD" name = "image-pipeline-asset-releases" github_repo_topics = [ "terraform" @@ -64,7 +64,7 @@ module "asset_releases" { module "aws_image_pipeline" { source = "HappyPathway/repo/github" github_repo_description = "Terraform Workspace for creating and managing AWS Image Pipelines" - repo_org = "arnol377" + repo_org = "CSVD" name = "aws-image-pipeline" github_repo_topics = [ "terraform" @@ -107,7 +107,7 @@ module "aws_image_pipeline" { module "terraform_aws_image_pipeline" { source = "HappyPathway/repo/github" github_repo_description = "Terraform Module that creates codepipeline and codebuild jobs and other resources for building and deploying images" - repo_org = "arnol377" + repo_org = "CSVD" name = "terraform-aws-image-pipeline" github_repo_topics = [ "terraform" diff --git a/main.tf b/main.tf index aefe265..006b3a9 100644 --- a/main.tf +++ b/main.tf @@ -1,8 +1,8 @@ locals { collaborators = { - naray007 = "push", - morga471 = "push", - gomez385 = "push" + naray007 = "admin", + morga471 = "admin", + gomez385 = "admin" } pull_request_bypassers = [ "arnol377", @@ -47,6 +47,57 @@ module "automation-repos" { pull_request_bypassers = local.pull_request_bypassers } +# terraform-repos +module "csvd-org-management" { + source = "git@github.e.it.census.gov:CSVD/terraform-github-repo" + #github_codeowners_team = "CSVD" + github_repo_description = "Automation Repos for Morpheus POC" + repo_org = "CSVD" + name = "csvd-org-management" + github_repo_topics = [ + "terraform" + ] + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers +} + +module "external-actions" { + source = "git@github.e.it.census.gov:CSVD/terraform-github-repo" + #github_codeowners_team = "CSVD" + github_repo_description = "Automation Repos for Morpheus POC" + repo_org = "CSVD" + name = "external-actions" + github_repo_topics = [ + "terraform" + ] + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers +} + +module "github-runner-images" { + source = "git@github.e.it.census.gov:CSVD/terraform-github-repo" + #github_codeowners_team = "CSVD" + github_repo_description = "Github Runner Images Import" + repo_org = "CSVD" + name = "github-runner-images" + github_repo_topics = [ + "terraform" + ] + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers +} + + + # centralized-actions module "centralized-actions" { source = "HappyPathway/repo/github"