From 8155898af03d4738635ac9428c19a5cc71479d25 Mon Sep 17 00:00:00 2001 From: Jo Date: Wed, 22 May 2024 08:51:11 -0400 Subject: [PATCH] fixed incorrect environment references in production workflow --- .github/workflows/deploy-production.yml | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 979798911..1b6fb306d 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -19,21 +19,21 @@ jobs: outputs: bucket: ${{ steps.output-bucket-name.outputs.bucket }} cloudfront_id: ${{ steps.output-cloudfront-distro.outputs.cloudfront_id }} -# env: -# TF_VAR_region: ${{ vars.AWS_REGION }} -# TF_VAR_environment: ${{ vars.ENV_SHORT_NAME }} -# TF_VAR_name_prefix: "tb-${{ vars.PROJECT_SHORT_NAME }}-${{ vars.ENV_SHORT_NAME }}" -# TF_VAR_app_env: ${{ vars.APP_ENV }} -# TF_VAR_db_enc_secret: ${{ vars.DB_ENCRYPTED_SECRET }} -# TF_VAR_frontend_url: ${{ vars.FRONTEND_URL }} -# TF_VAR_fxa_secret: ${{ vars.FXA_SECRET }} -# TF_VAR_google_oauth_secret: ${{ vars.GOOGLE_OAUTH_SECRET }} -# TF_VAR_log_level: ${{ vars.LOG_LEVEL }} -# TF_VAR_short_base_url: ${{ vars.SHORT_BASE_URL }} -# TF_VAR_smtp_secret: ${{ vars.SMTP_SECRET }} -# TF_VAR_zoom_callback: ${{ vars.ZOOM_CALLBACK }} -# TF_VAR_zoom_secret: ${{ vars.zoom_secret }} -# TF_VAR_sentry_dsn: ${{ vars.SENTRY_DSN }} + env: + TF_VAR_region: ${{ vars.AWS_REGION }} + TF_VAR_environment: ${{ vars.ENV_SHORT_NAME }} + TF_VAR_name_prefix: "tb-${{ vars.PROJECT_SHORT_NAME }}-${{ vars.ENV_SHORT_NAME }}" + TF_VAR_app_env: ${{ vars.APP_ENV }} + TF_VAR_db_enc_secret: ${{ vars.DB_ENCRYPTED_SECRET }} + TF_VAR_frontend_url: ${{ vars.FRONTEND_URL }} + TF_VAR_fxa_secret: ${{ vars.FXA_SECRET }} + TF_VAR_google_oauth_secret: ${{ vars.GOOGLE_OAUTH_SECRET }} + TF_VAR_log_level: ${{ vars.LOG_LEVEL }} + TF_VAR_short_base_url: ${{ vars.SHORT_BASE_URL }} + TF_VAR_smtp_secret: ${{ vars.SMTP_SECRET }} + TF_VAR_zoom_callback: ${{ vars.ZOOM_CALLBACK }} + TF_VAR_zoom_secret: ${{ vars.zoom_secret }} + TF_VAR_sentry_dsn: ${{ vars.SENTRY_DSN }} steps: - uses: actions/checkout@v4 @@ -57,7 +57,7 @@ jobs: terragrunt -v - name: vpc - working-directory: ./tofu/environments/stage/network/vpc + working-directory: ./tofu/environments/prod/network/vpc run: | terragrunt init -upgrade terragrunt validate @@ -65,7 +65,7 @@ jobs: # terragrunt apply tfplan # will be re-enabled once release workflow is tested - name: backend-infra - working-directory: ./tofu/environments/stage/services/backend-infra + working-directory: ./tofu/environments/prod/services/backend-infra run: | terragrunt init -upgrade terragrunt validate @@ -73,7 +73,7 @@ jobs: # terragrunt apply tfplan # will be re-enabled once release workflow is tested - name: cache - working-directory: ./tofu/environments/stage/data-store/cache + working-directory: ./tofu/environments/prod/data-store/cache run: | terragrunt init -upgrade terragrunt validate @@ -81,7 +81,7 @@ jobs: # terragrunt apply tfplan # will be re-enabled once release workflow is tested - name: database - working-directory: ./tofu/environments/stage/data-store/database + working-directory: ./tofu/environments/prod/data-store/database run: | terragrunt init -upgrade terragrunt validate @@ -89,7 +89,7 @@ jobs: # terragrunt apply tfplan # will be re-enabled once release workflow is tested - name: frontend-infra - working-directory: ./tofu/environments/stage/services/frontend-infra + working-directory: ./tofu/environments/prod/services/frontend-infra run: | terragrunt init -upgrade terragrunt validate @@ -98,14 +98,14 @@ jobs: - name: output-bucket-name id: output-bucket-name - working-directory: ./tofu/environments/stage/services/frontend-infra + working-directory: ./tofu/environments/prod/services/frontend-infra run: | output=$(terragrunt output bucket_name | tr -d '"') echo bucket=$output >> $GITHUB_OUTPUT - name: output-cloudfront-distro id: output-cloudfront-distro - working-directory: ./tofu/environments/stage/services/frontend-infra + working-directory: ./tofu/environments/prod/services/frontend-infra run: | output=$(terragrunt output cloudfront_id) echo cloudfront_id=$output >> $GITHUB_OUTPUT @@ -136,10 +136,10 @@ jobs: with: version: ${{ github.event.release.id }} file: ecr_tag.txt - target: ./tofu/environments/stage/services/backend-service + target: ./tofu/environments/prod/services/backend-service - name: Unzip ECR tag - working-directory: ./tofu/environments/stage/services/backend-service + working-directory: ./tofu/environments/prod/services/backend-service run: unzip ecr_tag.zip - name: Configure AWS credentials @@ -150,7 +150,7 @@ jobs: aws-region: ${{ vars.AWS_REGION }} - name: Deploy Backend - working-directory: ./tofu/environments/stage/services/backend-service + working-directory: ./tofu/environments/prod/services/backend-service run: | terragrunt init -upgrade terragrunt validate