diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index b9aa155c..b45baa68 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -61,7 +61,7 @@ jobs: run: terraform plan -var-file=${STAGE}.tfvars -out=tfplan - name: Terraform Apply - # if: env.STAGE == 'prod' + if: env.STAGE == 'prod' working-directory: infrastructure/terraform/shared run: terraform apply -auto-approve tfplan @@ -130,4 +130,18 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} AWS_REGION: ${{ secrets.DEV_AWS_REGION }} + # ============================================================ + # 3 Condition ETL image and Push + # ============================================================ + condition_etl_image: + needs: [determine_stage, shared_terraform] + uses: ./.github/workflows/_build_image.yml + with: + ecr_repo: condition-etl-${{ needs.determine_stage.outputs.stage }} + dockerfile_path: backend/condition/Dockerfile + build_context: . + 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 }} diff --git a/backend/condition/Dockerfile b/backend/condition/Dockerfile index e69de29b..49723667 100644 --- a/backend/condition/Dockerfile +++ b/backend/condition/Dockerfile @@ -0,0 +1,15 @@ +FROM public.ecr.aws/lambda/python:3.11 + +# Set working directory (Lambda task root) +WORKDIR /var/task + + +# ----------------------------- +# Copy application code +# ----------------------------- + + +# ----------------------------- +# Lambda handler +# ----------------------------- +CMD ["handler.handler"]