fix(infra): assert google-client-id SSM exists at plan time

Wire the google_client_id data source into a check so apply fails closed when the OOB parameter is missing.
This commit is contained in:
Adam Moussa 2026-08-07 19:28:25 -04:00
parent 1728f6e408
commit 3906ad1885
No known key found for this signature in database

View file

@ -30,3 +30,13 @@ data "aws_ssm_parameter" "app_web_acl_arn" {
data "aws_ssm_parameter" "google_client_id" {
name = local.google_client_id_param
}
# Fail closed if the OOB Google client ID parameter is missing or empty. The
# functions receive the parameter NAME via env; this check forces the data
# source to be evaluated so apply cannot succeed without the parameter.
check "google_client_id_present" {
assert {
condition = length(data.aws_ssm_parameter.google_client_id.value) > 0
error_message = "SSM parameter ${local.google_client_id_param} is missing or empty; create it out of band before apply."
}
}