mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Expose the Abri test project-code override to the scraper lambda 🟩
Wires TEST_ABRI_PROJECT_CODE_OVERRIDE from an optional deploy-time tfvar through to the hubspot_deal_etl lambda env; unset keeps production behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
002f782905
commit
8e880eea6f
4 changed files with 25 additions and 8 deletions
3
.github/workflows/_deploy_lambda.yml
vendored
3
.github/workflows/_deploy_lambda.yml
vendored
|
|
@ -109,6 +109,8 @@ on:
|
|||
required: false
|
||||
TF_VAR_abri_relay_default_resource:
|
||||
required: false
|
||||
TF_VAR_test_abri_project_code_override:
|
||||
required: false
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -188,6 +190,7 @@ jobs:
|
|||
TF_VAR_abri_relay_username: ${{ secrets.TF_VAR_abri_relay_username }}
|
||||
TF_VAR_abri_relay_password: ${{ secrets.TF_VAR_abri_relay_password }}
|
||||
TF_VAR_abri_relay_default_resource: ${{ secrets.TF_VAR_abri_relay_default_resource }}
|
||||
TF_VAR_test_abri_project_code_override: ${{ secrets.TF_VAR_test_abri_project_code_override }}
|
||||
run: |
|
||||
ECR_REPO_URL_VAR=""
|
||||
if [[ -n "${{ inputs.ecr_repo }}" ]]; then
|
||||
|
|
|
|||
4
.github/workflows/deploy_terraform.yml
vendored
4
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -837,3 +837,7 @@ jobs:
|
|||
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 }}
|
||||
# Temporary Abri end-to-end-test toggle. Unset ⇒ empty ⇒ the differ keeps
|
||||
# the production stock-condition project code. Set this repo secret to a
|
||||
# sandbox deal's project code to test, then delete it.
|
||||
TF_VAR_test_abri_project_code_override: ${{ secrets.TF_VAR_test_abri_project_code_override }}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ data "terraform_remote_state" "shared" {
|
|||
backend = "s3"
|
||||
config = {
|
||||
bucket = "assessment-model-terraform-state"
|
||||
key = "env:/${var.stage}/terraform.tfstate"
|
||||
key = "env:/${var.stage}/terraform.tfstate"
|
||||
region = "eu-west-2"
|
||||
}
|
||||
}
|
||||
|
|
@ -57,18 +57,20 @@ module "hubspot_deal_etl" {
|
|||
batch_size = var.batch_size
|
||||
|
||||
environment = {
|
||||
STAGE = var.stage
|
||||
LOG_LEVEL = "info"
|
||||
DB_USERNAME = local.db_credentials.db_assessment_model_username
|
||||
DB_PASSWORD = local.db_credentials.db_assessment_model_password
|
||||
DB_HOST = var.db_host
|
||||
DB_NAME = var.db_name
|
||||
DB_PORT = var.db_port
|
||||
STAGE = var.stage
|
||||
LOG_LEVEL = "info"
|
||||
DB_USERNAME = local.db_credentials.db_assessment_model_username
|
||||
DB_PASSWORD = local.db_credentials.db_assessment_model_password
|
||||
DB_HOST = var.db_host
|
||||
DB_NAME = var.db_name
|
||||
DB_PORT = var.db_port
|
||||
HUBSPOT_API_KEY = var.hubspot_api_key
|
||||
|
||||
PASHUB_TO_ARA_SQS_URL = data.terraform_remote_state.pashub_to_ara.outputs.pashub_to_ara_queue_url
|
||||
MAGICPLAN_SQS_URL = data.terraform_remote_state.magic_plan.outputs.magic_plan_queue_url
|
||||
ABRI_SQS_URL = data.terraform_remote_state.abri.outputs.abri_api_queue_url
|
||||
|
||||
TEST_ABRI_PROJECT_CODE_OVERRIDE = var.test_abri_project_code_override
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,4 +52,12 @@ variable "db_name" {
|
|||
|
||||
variable "db_port" {
|
||||
type = string
|
||||
}
|
||||
|
||||
# Temporary end-to-end-test toggle: overrides the hardcoded Abri stock-condition
|
||||
# project code the deal differ gates on, so a sandbox deal on its own project
|
||||
# code fires the Abri flows. Empty (the default) keeps the production code.
|
||||
variable "test_abri_project_code_override" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue