diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 216069fe..71e2ad9d 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -189,46 +189,6 @@ jobs: ecr_repo: condition-etl-${{ needs.determine_stage.outputs.stage }} image_digest: ${{ needs.condition_etl_image.outputs.image_digest }} terraform_apply: ${{ needs.determine_stage.outputs.terraform_apply }} - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.DEV_AWS_REGION }} - - # ============================================================ - # Categorisation image and Push - # ============================================================ - categorisation_image: - needs: [determine_stage, shared_terraform] - uses: ./.github/workflows/_build_image.yml - with: - ecr_repo: categorisation-${{ needs.determine_stage.outputs.stage }} - dockerfile_path: backend/categorisation/handler/Dockerfile - build_context: . - build_args: | - DEV_DB_HOST=$DEV_DB_HOST - DEV_DB_PORT=$DEV_DB_PORT - DEV_DB_NAME=$DEV_DB_NAME - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.DEV_AWS_REGION }} - DEV_DB_HOST: ${{ secrets.DEV_DB_HOST }} - DEV_DB_PORT: ${{ secrets.DEV_DB_PORT }} - DEV_DB_NAME: ${{ secrets.DEV_DB_NAME }} - - # ============================================================ - # Deploy Categorisation Lambda - # ============================================================ - categorisation_lambda: - needs: [categorisation_image, determine_stage] - uses: ./.github/workflows/_deploy_lambda.yml - with: - lambda_name: categorisation - lambda_path: infrastructure/terraform/lambda/categorisation - stage: ${{ needs.determine_stage.outputs.stage }} - ecr_repo: categorisation-${{ needs.determine_stage.outputs.stage }} - image_digest: ${{ needs.categorisation_image.outputs.image_digest }} - terraform_apply: ${{ needs.determine_stage.outputs.terraform_apply }} secrets: AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} diff --git a/infrastructure/terraform/lambda/_template/README.md b/infrastructure/terraform/lambda/_template/README.md index a7282fc9..7992ec5c 100644 --- a/infrastructure/terraform/lambda/_template/README.md +++ b/infrastructure/terraform/lambda/_template/README.md @@ -3,7 +3,7 @@ ### 1. Create the Lambda scaffold - Copy the template: - cp -r lambda/_template lambda/ + `cp -r lambda/_template lambda/` --- @@ -13,7 +13,7 @@ infrastructure/terraform/shared/main.tf - Apply the shared stack - - This requires commenting 'if env.stage == "prod"' in .github/workflows/deploy_terraform.yml + - This requires commenting `if: env.STAGE == 'prod'` in .github/workflows/deploy_terraform.yml - Verify the ECR repository exists in AWS