Skip to content

Commit

Permalink
Merge branch 'main' of github.e.it.census.gov:CSVD/automation-repos
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Sep 25, 2024
2 parents df25a58 + 6e026e2 commit 97a0d00
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/terraform_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
# The type of runner that the job will run on
runs-on: [ "229685449397" ]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_OWNER: CSVD
GITHUB_BASE_URL: https://github.e.it.census.gov
TF_WORKSPACE: ${{ vars.terraform_workspace }}

# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down Expand Up @@ -51,10 +53,10 @@ jobs:

- name: Terraform Plan
id: plan
run: /opt/tfenv/bin/terraform plan -var-file=varfies/${{ vars.terraform_workspace }}.tfvars
run: /opt/tfenv/bin/terraform plan -var-file=varfiles/${{ vars.terraform_workspace }}.tfvars

# - name: Terraform Apply
# id: plan
# run: /opt/tfenv/bin/terraform apply -auto-approve
# run: /opt/tfenv/bin/terraform apply -auto-approve -var-file=varfiles/${{ vars.terraform_workspace }}.tfvars
# continue-on-error: true

2 changes: 2 additions & 0 deletions data.tf
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
data "aws_region" "current" {}

data "github_organization_teams" "teams" {}
2 changes: 2 additions & 0 deletions github-runners.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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
}
4 changes: 4 additions & 0 deletions image-pipeline.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
]
Expand All @@ -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"
]
Expand Down Expand Up @@ -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"
]
Expand Down
17 changes: 17 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ locals {
"arnol377",
"gomez385"
]
github_organization_teams = data.github_organization_teams.teams
}


Expand All @@ -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
}


Expand All @@ -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
Expand All @@ -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" {
Expand All @@ -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" {
Expand All @@ -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
}


Expand All @@ -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
Expand All @@ -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
}


Expand All @@ -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" {
Expand All @@ -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" {
Expand All @@ -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
}


Expand All @@ -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
}


Expand All @@ -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" {
Expand All @@ -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" {
Expand All @@ -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" {
Expand All @@ -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
Expand All @@ -290,6 +306,7 @@ module "ghe_runners" {
create_codeowners = false
enforce_prs = false
collaborators = local.collaborators
github_org_teams = local.github_organization_teams
}

module "vpc_services" {
Expand Down
1 change: 1 addition & 0 deletions morpheus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
1 change: 1 addition & 0 deletions sandbox.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 97a0d00

Please sign in to comment.