From 0d02a89c840bda59f3d1a200525d3f77c502cb5a Mon Sep 17 00:00:00 2001 From: Mike Pond <32133001+P0NDER0SA@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:35:45 -0400 Subject: [PATCH] tweaks to remove some things that aren't necessary for prod (#1571) --- .../workflows/merge_to_main_production.yml | 64 +----------------- .../workflows/terragrunt_plan_production.yml | 67 ------------------- 2 files changed, 1 insertion(+), 130 deletions(-) diff --git a/.github/workflows/merge_to_main_production.yml b/.github/workflows/merge_to_main_production.yml index 678b30ad5..668e0f11f 100644 --- a/.github/workflows/merge_to_main_production.yml +++ b/.github/workflows/merge_to_main_production.yml @@ -349,68 +349,6 @@ jobs: cd env/${{env.ENVIRONMENT}}/lambda-api terragrunt apply --terragrunt-non-interactive -auto-approve - terragrunt-apply-lambda-admin-pr: - if: | - always() && - !contains(needs.*.result, 'failure') && - !contains(needs.*.result, 'cancelled') - runs-on: ubuntu-latest - needs: [terragrunt-apply-common,terragrunt-apply-elasticache,terragrunt-apply-ecr] - - steps: - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - name: setup-terraform - uses: ./.github/actions/setup-terraform - with: - role_to_assume: arn:aws:iam::${{env.ACCOUNT_ID}}:role/notification-terraform-apply - role_session_name: NotifyTerraformApply - - - name: Install 1Pass CLI - run: | - curl -o 1pass.deb https://downloads.1password.com/linux/debian/amd64/stable/1password-cli-amd64-latest.deb - sudo dpkg -i 1pass.deb - sudo mkdir -p aws - cd aws - op read op://ppnxsriom3alsxj4ogikyjxlzi/"TFVars - ${{env.ENVIRONMENT}}"/notesPlain > ${{env.ENVIRONMENT}}.tfvars - - - name: terragrunt apply lambda-admin-pr - run: | - cd env/${{env.ENVIRONMENT}}/lambda-admin-pr - terragrunt apply --terragrunt-non-interactive -auto-approve - - terragrunt-apply-performance-test: - if: | - always() && - !contains(needs.*.result, 'failure') && - !contains(needs.*.result, 'cancelled') - runs-on: ubuntu-latest - needs: [terragrunt-apply-common,terragrunt-apply-eks,terragrunt-apply-ecr] - - steps: - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - name: setup-terraform - uses: ./.github/actions/setup-terraform - with: - role_to_assume: arn:aws:iam::${{env.ACCOUNT_ID}}:role/notification-terraform-apply - role_session_name: NotifyTerraformApply - - - name: Install 1Pass CLI - run: | - curl -o 1pass.deb https://downloads.1password.com/linux/debian/amd64/stable/1password-cli-amd64-latest.deb - sudo dpkg -i 1pass.deb - sudo mkdir -p aws - cd aws - op read op://ppnxsriom3alsxj4ogikyjxlzi/"TFVars - ${{env.ENVIRONMENT}}"/notesPlain > ${{env.ENVIRONMENT}}.tfvars - - - name: terragrunt apply performance-test - run: | - cd env/${{env.ENVIRONMENT}}/performance-test - terragrunt apply --terragrunt-non-interactive -auto-approve - terragrunt-apply-heartbeat: if: | always() && @@ -728,7 +666,7 @@ jobs: !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') runs-on: ubuntu-latest - needs: [terragrunt-apply-common,terragrunt-apply-ecr,terragrunt-apply-dns,terragrunt-apply-ses_validation_dns_entries,terragrunt-apply-cloudfront,terragrunt-apply-eks,terragrunt-apply-elasticache,terragrunt-apply-rds,terragrunt-apply-lambda-api,terragrunt-apply-lambda-admin-pr,terragrunt-apply-performance-test,terragrunt-apply-heartbeat,terragrunt-apply-database-tools,terragrunt-apply-quicksight,terragrunt-apply-lambda-google-cidr,terragrunt-apply-ses_to_sqs_email_callbacks,terragrunt-apply-sns_to_sqs_sms_callbacks,terragrunt-apply-pinpoint_to_sqs_sms_callbacks,terragrunt-apply-system_status,terragrunt-apply-ses_receiving_emails,terragrunt-apply-system_status_static_site,terragrunt-apply-newrelic] + needs: [terragrunt-apply-common,terragrunt-apply-ecr,terragrunt-apply-dns,terragrunt-apply-ses_validation_dns_entries,terragrunt-apply-cloudfront,terragrunt-apply-eks,terragrunt-apply-elasticache,terragrunt-apply-rds,terragrunt-apply-lambda-api,terragrunt-apply-heartbeat,terragrunt-apply-database-tools,terragrunt-apply-quicksight,terragrunt-apply-lambda-google-cidr,terragrunt-apply-ses_to_sqs_email_callbacks,terragrunt-apply-sns_to_sqs_sms_callbacks,terragrunt-apply-pinpoint_to_sqs_sms_callbacks,terragrunt-apply-system_status,terragrunt-apply-ses_receiving_emails,terragrunt-apply-system_status_static_site,terragrunt-apply-newrelic] steps: - name: Checkout uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 diff --git a/.github/workflows/terragrunt_plan_production.yml b/.github/workflows/terragrunt_plan_production.yml index f72660c14..52a0ad179 100644 --- a/.github/workflows/terragrunt_plan_production.yml +++ b/.github/workflows/terragrunt_plan_production.yml @@ -344,73 +344,6 @@ jobs: terraform-init: | -upgrade - terragrunt-plan-lambda-admin-pr: - if: | - always() && - !contains(needs.*.result, 'failure') && - !contains(needs.*.result, 'cancelled') - runs-on: ubuntu-latest - needs: [terragrunt-plan-common,terragrunt-plan-elasticache,terragrunt-plan-ecr] - env: - COMPONENT: "lambda-admin-pr" - steps: - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - uses: ./.github/actions/setup-terraform - with: - role_to_assume: arn:aws:iam::${{env.ACCOUNT_ID}}:role/notification-terraform-plan - role_session_name: NotifyTerraformPlan - - name: Install 1Pass CLI and Download TFVars - run: | - curl -o 1pass.deb https://downloads.1password.com/linux/debian/amd64/stable/1password-cli-amd64-latest.deb - sudo dpkg -i 1pass.deb - sudo mkdir -p aws && cd aws - op read op://ppnxsriom3alsxj4ogikyjxlzi/"TFVars - ${{env.ENVIRONMENT}}"/notesPlain > ${{env.ENVIRONMENT}}.tfvars - - name: Terragrunt plan ${{env.COMPONENT}} - uses: cds-snc/terraform-plan@7f4ce4a4bdffaba639d32a45272804e37a569408 # v3.0.6 - with: - directory: "env/${{env.ENVIRONMENT}}/${{env.COMPONENT}}" - comment-delete: "true" - comment-title: "${{env.ENVIRONMENT}}: ${{env.COMPONENT}}" - github-token: "${{ secrets.GITHUB_TOKEN }}" - terragrunt: "true" - terraform-init: | - -upgrade - - terragrunt-plan-performance-test: - if: | - always() && - !contains(needs.*.result, 'failure') && - !contains(needs.*.result, 'cancelled') - runs-on: ubuntu-latest - needs: [terragrunt-plan-common,terragrunt-plan-eks,terragrunt-plan-ecr] - env: - COMPONENT: "performance-test" - steps: - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - uses: ./.github/actions/setup-terraform - with: - role_to_assume: arn:aws:iam::${{env.ACCOUNT_ID}}:role/notification-terraform-plan - role_session_name: NotifyTerraformPlan - - name: Install 1Pass CLI and Download TFVars - run: | - curl -o 1pass.deb https://downloads.1password.com/linux/debian/amd64/stable/1password-cli-amd64-latest.deb - sudo dpkg -i 1pass.deb - sudo mkdir -p aws && cd aws - op read op://ppnxsriom3alsxj4ogikyjxlzi/"TFVars - ${{env.ENVIRONMENT}}"/notesPlain > ${{env.ENVIRONMENT}}.tfvars - - name: Terragrunt plan ${{env.COMPONENT}} - uses: cds-snc/terraform-plan@7f4ce4a4bdffaba639d32a45272804e37a569408 # v3.0.6 - with: - directory: "env/${{env.ENVIRONMENT}}/${{env.COMPONENT}}" - comment-delete: "true" - comment-title: "${{env.ENVIRONMENT}}: ${{env.COMPONENT}}" - github-token: "${{ secrets.GITHUB_TOKEN }}" - terragrunt: "true" - skip-conftest: "true" - terraform-init: | - -upgrade - terragrunt-plan-heartbeat: if: | always() &&