From 895ceb89cf9565481cc46fa113f8c714aefc9318 Mon Sep 17 00:00:00 2001 From: Chris Preston Date: Wed, 18 Oct 2023 13:05:37 -0700 Subject: [PATCH] Added INT deployment using s3 backend --- .github/workflows/deploy_int.yml | 18 ++++++++++-------- terragrunt/INT/terragrunt.hcl | 16 ++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy_int.yml b/.github/workflows/deploy_int.yml index 97aefb7..9237db6 100644 --- a/.github/workflows/deploy_int.yml +++ b/.github/workflows/deploy_int.yml @@ -77,15 +77,17 @@ jobs: openssl sha256 staging/wfdm-file-index-initializer* > staging/wfdm-file-index-initializer-hash.txt openssl sha256 staging/wfdm-opensearch-indexing* > staging/wfdm-opensearch-indexing-hash.txt - - uses: shallwefootball/s3-upload-action@master - name: Upload S3 - id: S3 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 with: - aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} - aws_bucket: wfdm-s3-bucket-${{ env.TARGET_ENV }} - source_dir: staging - destination_dir: '' + role-to-assume: ${{ secrets.AWS_TERRAFORM_ROLE_TO_ASSUME }} + role-session-name: wfdm-terraform + aws-region: ca-central-1 + + - name: Upload S3 + id: S3 + run: + aws s3 cp ./staging s3://wfdm-s3-bucket-int --recursive # Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token - name: Setup Terraform diff --git a/terragrunt/INT/terragrunt.hcl b/terragrunt/INT/terragrunt.hcl index 0b42125..8674e9b 100644 --- a/terragrunt/INT/terragrunt.hcl +++ b/terragrunt/INT/terragrunt.hcl @@ -22,21 +22,17 @@ generate "backend" { if_exists = "overwrite_terragrunt" contents = <