mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
/health already returned GITHUB_SHA in its response but never logged it, and the fastapi lambda's Terraform environment never actually set GITHUB_SHA — so every health check response contained "unknown" in production. Wire var.github_sha through the fastapi lambda module (default "unknown" for local/other invocations) via a new TF_VAR_github_sha env var set from `github.sha` in _deploy_lambda.yml's Terraform Plan step, and log it on every /health call so a request in CloudWatch can be tied back to the deploy that served it. Also fix the zip-size gate added for PR #1469: putting it in tests/test_lambda_zip_size.py (run via the Docker-based ddd_tests.yml suite) broke CI, because Dockerfile.test's build context excludes deployment/* (.dockerignore), so check_lambda_zip_size.py couldn't find variables.tf to read zip_excludes from inside that container. Move the check to its own lightweight workflow, check_lambda_zip_size.yml, triggered on pull_request into main — a plain checkout (no Docker build) has the full repo, so the check works, runs fast, and still gates merges to main before a regression can roll into the dev deploy. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
50 lines
782 B
HCL
50 lines
782 B
HCL
variable "lambda_name" {
|
|
type = string
|
|
description = "Logical name of the lambda (e.g. address2uprn)"
|
|
}
|
|
|
|
variable "stage" {
|
|
type = string
|
|
}
|
|
|
|
variable "db_host" {
|
|
type = string
|
|
}
|
|
|
|
variable "db_name" {
|
|
type = string
|
|
}
|
|
|
|
variable "db_port" {
|
|
type = string
|
|
}
|
|
|
|
variable "api_key" {
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "secret_key" {
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "domain_name" {
|
|
type = string
|
|
}
|
|
|
|
variable "epc_auth_token" {
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "google_solar_api_key" {
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "github_sha" {
|
|
type = string
|
|
description = "Commit SHA being deployed, surfaced via /health so cloud logs can be tied back to a deploy."
|
|
default = "unknown"
|
|
}
|