From b42996a3c8903ad43f69a7497e638d79bc3bfc4d Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 5 Feb 2026 17:25:17 +0000 Subject: [PATCH] try dev_DB_HOST --- .github/workflows/_build_image.yml | 3 +++ .github/workflows/deploy_terraform.yml | 3 +++ backend/condition/handler/Dockerfile | 6 ++++++ backend/condition/handler/handler.py | 10 +++++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_build_image.yml b/.github/workflows/_build_image.yml index e7f19ed5..5d217607 100644 --- a/.github/workflows/_build_image.yml +++ b/.github/workflows/_build_image.yml @@ -34,6 +34,8 @@ on: required: true DEV_DB_HOST: required: false + dev_DB_HOST: + required: false jobs: build: @@ -80,6 +82,7 @@ jobs: done <<< "${{ inputs.build_args }}" echo "dev db host: $DEV_DB_HOST" + echo "dev db host: $dev_DB_HOST" echo "aws_key_id: $AWS_ACCESS_KEY_ID" docker build \ diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 8a442f94..dbf8e2b5 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -143,12 +143,15 @@ jobs: build_args: | JUNTE=best DEV_DB_HOST=$DEV_DB_HOST + dev_DB_HOST=$dev_DB_HOST AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID + AWS_REGION=$AWS_REGION 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_HOST: ${{ secrets.dev_DB_HOST }} # ============================================================ # Deploy Condition ETL Lambda diff --git a/backend/condition/handler/Dockerfile b/backend/condition/handler/Dockerfile index 8ba8300a..5359f71b 100644 --- a/backend/condition/handler/Dockerfile +++ b/backend/condition/handler/Dockerfile @@ -12,9 +12,15 @@ ENV JUNTE=${JUNTE} ARG DEV_DB_HOST ENV DEV_DB_HOST=${DEV_DB_HOST} +ARG dev_DB_HOST +ENV dev_DB_HOST=${dev_DB_HOST} + ARG AWS_ACCESS_KEY_ID ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} +ARG AWS_REGION +ENV AWS_REGION=${AWS_REGION} + # Set working directory (Lambda task root) WORKDIR /var/task diff --git a/backend/condition/handler/handler.py b/backend/condition/handler/handler.py index 7552f3de..40a931c1 100644 --- a/backend/condition/handler/handler.py +++ b/backend/condition/handler/handler.py @@ -20,13 +20,21 @@ def handler(event: Mapping[str, Any], context: Any) -> None: os.getenv("JUNTE", "empty junte"), ) print( - "hello DB host", + "hello DEV DB HOST:", os.getenv("DEV_DB_HOST", "empty db"), ) + print( + "hello dev DB HOST:", + os.getenv("dev_DB_HOST", "empty db"), + ) print( "hello access key", os.getenv("AWS_ACCESS_KEY_ID", "empty key"), ) + print( + "hello region", + os.getenv("AWS_REGION", "empty region"), + ) # uprn_lookup = UprnLookupS3( # bucket="", key="" # ) # TODO: replace with postgres implementation