get sqs url and arn from env vars

This commit is contained in:
Daniel Roth 2026-03-02 16:48:09 +00:00
parent 08a5c286f7
commit 7676194cdc
2 changed files with 6 additions and 2 deletions

View file

@ -77,6 +77,8 @@ jobs:
echo "::set-output name=hotwater_kwh_predictions_bucket::${{ secrets[format('{0}_HOTWATER_KWH_PREDICTIONS_BUCKET', github.ref_name)] }}"
echo "::set-output name=energy_asessments_bucket::${{ secrets[format('{0}_ENERGY_ASSESSMENTS_BUCKET', github.ref_name)] }}"
echo "::set-output name=google_solar_api_key::${{ secrets[format('{0}_GOOGLE_SOLAR_API_KEY', github.ref_name)] }}"
echo "::set-output name=categorisation_sqs_url::${{ secrets[format('{0}_CATEGORISATION_SQS_URL', github.ref_name)] }}"
echo "::set-output name=categorisation_sqs_arn::${{ secrets[format('{0}_CATEGORISATION_SQS_ARN', github.ref_name)] }}"
- name: Setup Docker
uses: docker/setup-buildx-action@v1
@ -122,6 +124,8 @@ jobs:
HOTWATER_KWH_PREDICTIONS_BUCKET: ${{ steps.set_api_secrets.outputs.hotwater_kwh_predictions_bucket }}
ENERGY_ASSESSMENTS_BUCKET: ${{ steps.set_api_secrets.outputs.energy_asessments_bucket }}
GOOGLE_SOLAR_API_KEY: ${{ steps.set_api_secrets.outputs.google_solar_api_key }}
CATEGORISATION_SQS_URL: ${{ steps.set_api_secrets.outputs.categorisation_sqs_url }}
CATEGORISATION_SQS_ARN: ${{ steps.set_api_secrets.outputs.categorisation_sqs_arn }}
DOMAIN_NAME: ${{ steps.set_domain.outputs.domain }}
EPC_AUTH_TOKEN: ${{ steps.set_auth_token.outputs.auth_token }}
DB_HOST: ${{ steps.set_db_credentials.outputs.db_host }}

View file

@ -31,7 +31,7 @@ provider:
ENGINE_SQS_URL:
Ref: EngineQueue
# hardcode the categorisation queue for now as it's created in terraform
CATEGORISATION_SQS_URL: "https://sqs.eu-west-2.amazonaws.com/337213553626/categorisation-queue-dev"
CATEGORISATION_SQS_URL: ${env:CATEGORISATION_SQS_URL}
plugins:
- serverless-python-requirements
@ -108,7 +108,7 @@ resources:
- sqs:SendMessage
Resource:
- Fn::GetAtt: [ EngineQueue, Arn ]
- "arn:aws:sqs:eu-west-2:337213553626:categorisation-queue-dev"
- ${env:CATEGORISATION_SQS_URL}
- Effect: Allow
Action:
- s3:GetObject