Skip to content

Commit

Permalink
fixed incorrect environment references in production workflow (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbass authored May 22, 2024
1 parent 4f895c9 commit 5c2c710
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -57,39 +57,39 @@ 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
terragrunt plan -out tfplan
# 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
terragrunt plan -out tfplan
# 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
terragrunt plan -out tfplan
# 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
terragrunt plan -out tfplan
# 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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5c2c710

Please sign in to comment.