mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
FastAPI Lambda can send to the modelling_e2e queue
Remote state + MODELLING_E2E_SQS_URL env var + send policy ARN, and fast_api_lambda deploys after modelling_e2e_lambda so the remote state exists before it applies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
bf8647c9b5
commit
60c448e66d
2 changed files with 13 additions and 2 deletions
2
.github/workflows/deploy_terraform.yml
vendored
2
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -538,7 +538,7 @@ jobs:
|
|||
# Deploy FastAPI Lambda
|
||||
# ============================================================
|
||||
fast_api_lambda:
|
||||
needs: [determine_stage, ara_engine_lambda, categorisation_lambda, postcodeSplitter_lambda, bulk_address2uprn_combiner_lambda, bulkUploadFinaliser_lambda]
|
||||
needs: [determine_stage, ara_engine_lambda, categorisation_lambda, postcodeSplitter_lambda, bulk_address2uprn_combiner_lambda, bulkUploadFinaliser_lambda, modelling_e2e_lambda]
|
||||
uses: ./.github/workflows/_deploy_lambda.yml
|
||||
with:
|
||||
lambda_name: ara_fast_api
|
||||
|
|
|
|||
|
|
@ -64,6 +64,15 @@ data "terraform_remote_state" "landlord_description_overrides" {
|
|||
}
|
||||
}
|
||||
|
||||
data "terraform_remote_state" "modelling_e2e" {
|
||||
backend = "s3"
|
||||
config = {
|
||||
bucket = "modelling-e2e-terraform-state",
|
||||
key = "env:/${var.stage}/terraform.tfstate"
|
||||
region = "eu-west-2"
|
||||
}
|
||||
}
|
||||
|
||||
############################################
|
||||
# Load Credentials
|
||||
############################################
|
||||
|
|
@ -126,6 +135,7 @@ module "fastapi" {
|
|||
COMBINER_SQS_URL = data.terraform_remote_state.bulk_address2uprn_combiner.outputs.bulk_address2uprn_combiner_queue_url
|
||||
FINALISER_SQS_URL = data.terraform_remote_state.bulk_upload_finaliser.outputs.bulk_upload_finaliser_queue_url
|
||||
LANDLORD_OVERRIDES_SQS_URL = data.terraform_remote_state.landlord_description_overrides.outputs.landlord_description_overrides_queue_url
|
||||
MODELLING_E2E_SQS_URL = data.terraform_remote_state.modelling_e2e.outputs.modelling_e2e_queue_url
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +159,8 @@ module "fastapi_sqs_policy" {
|
|||
data.terraform_remote_state.postcode_splitter.outputs.postcode_splitter_queue_arn,
|
||||
data.terraform_remote_state.bulk_address2uprn_combiner.outputs.bulk_address2uprn_combiner_queue_arn,
|
||||
data.terraform_remote_state.bulk_upload_finaliser.outputs.bulk_upload_finaliser_queue_arn,
|
||||
data.terraform_remote_state.landlord_description_overrides.outputs.landlord_description_overrides_queue_arn
|
||||
data.terraform_remote_state.landlord_description_overrides.outputs.landlord_description_overrides_queue_arn,
|
||||
data.terraform_remote_state.modelling_e2e.outputs.modelling_e2e_queue_arn
|
||||
]
|
||||
|
||||
conditions = null
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue