Summary
PR #73 flipped the cloud_run_ingress variable default in terraform/environments/gcp/variables.tf to INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER, but every shipped tfvars file currently overrides it back to INGRESS_TRAFFIC_ALL because the supporting Cloud Armor + Load Balancer stack isn't enabled in any environment yet (enable_cdn = false everywhere). That's why the PR used Refs #51 rather than Closes #51.
This issue tracks the per-env migration so the security gap doesn't sit invisible in the override list forever.
Current behaviour
$ grep -n "cloud_run_ingress" terraform/environments/gcp/*.tfvars*
terraform/environments/gcp/dev.tfvars.example:...:cloud_run_ingress = "INGRESS_TRAFFIC_ALL"
terraform/environments/gcp/github-dev.tfvars:...:cloud_run_ingress = "INGRESS_TRAFFIC_ALL"
terraform/environments/gcp/github-staging.tfvars:...:cloud_run_ingress = "INGRESS_TRAFFIC_ALL"
terraform/environments/gcp/github-prod.tfvars:...:cloud_run_ingress = "INGRESS_TRAFFIC_ALL"
All 4 envs override the new secure default. Cloud Run is currently behind IAM-level auth only (cloud_run_allow_unauthenticated = false, per the first half of #51) — defence-in-depth via LB + Cloud Armor is not yet in effect.
Steps to reproduce / verify the gap
# 1. Confirm every tfvars overrides the secure default
grep -n "cloud_run_ingress" terraform/environments/gcp/*.tfvars*
# 2. Confirm the deployed Cloud Run ingress annotation reflects the override
gcloud run services describe <svc> --region <region> \
--format='value(spec.template.metadata.annotations[run.googleapis.com/ingress])'
# Returns: all
# Expected after migration: internal-and-cloud-load-balancing
Expected behaviour
Each env's tfvar should drop the cloud_run_ingress override once its LB + DNS + cert are provisioned, so the secure variable default takes effect and Cloud Run is reachable only via the LB (with Cloud Armor in front).
Proposed fix — per-env migration steps
Run this 4-step checklist for each env, in this order: dev → github-dev → github-staging → github-prod.
dev (terraform/environments/gcp/dev.tfvars.example)
github-dev (terraform/environments/gcp/github-dev.tfvars)
github-staging (terraform/environments/gcp/github-staging.tfvars)
github-prod (terraform/environments/gcp/github-prod.tfvars)
References
Severity
Medium — defence-in-depth gap. Cloud Run is currently behind IAM-level auth only; a misconfigured IAM binding (e.g. an accidental allUsers / allAuthenticatedUsers grant) would expose the service directly to the public internet without a Load Balancer / Cloud Armor in front to absorb abuse.
Effort per env
Medium — depends on whether DNS + cert are already provisioned. dev is the quickest (no production traffic, easiest to validate); github-prod requires the most coordination (DNS cutover, monitoring, rollback plan).
Why not a single PR
Each env's migration is operator-coordinated (DNS records, cert provisioning, traffic cutover validation) and breaks differently if it goes wrong. Better tracked as a checklist with one item closed per env than as a monolithic PR that has to land everywhere at once.
Summary
PR #73 flipped the
cloud_run_ingressvariable default interraform/environments/gcp/variables.tftoINGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER, but every shipped tfvars file currently overrides it back toINGRESS_TRAFFIC_ALLbecause the supporting Cloud Armor + Load Balancer stack isn't enabled in any environment yet (enable_cdn = falseeverywhere). That's why the PR usedRefs #51rather thanCloses #51.This issue tracks the per-env migration so the security gap doesn't sit invisible in the override list forever.
Current behaviour
All 4 envs override the new secure default. Cloud Run is currently behind IAM-level auth only (
cloud_run_allow_unauthenticated = false, per the first half of #51) — defence-in-depth via LB + Cloud Armor is not yet in effect.Steps to reproduce / verify the gap
Expected behaviour
Each env's tfvar should drop the
cloud_run_ingressoverride once its LB + DNS + cert are provisioned, so the secure variable default takes effect and Cloud Run is reachable only via the LB (with Cloud Armor in front).Proposed fix — per-env migration steps
Run this 4-step checklist for each env, in this order:
dev→github-dev→github-staging→github-prod.dev (
terraform/environments/gcp/dev.tfvars.example)enable_cdn = trueto instantiate the LB stack atterraform/modules/frontend/gcp/.frontend_domain_names+dns_managed_zone_name.cloud_run_ingress = "INGRESS_TRAFFIC_ALL"line from the tfvar.gcloud run services describe ...(annotation flips tointernal-and-cloud-load-balancing) andcurlagainst the direct Cloud Run URL (expect 403) vs the LB domain (expect 200).github-dev (
terraform/environments/gcp/github-dev.tfvars)enable_cdn = trueto instantiate the LB stack.frontend_domain_names+dns_managed_zone_name.cloud_run_ingress = "INGRESS_TRAFFIC_ALL"line.gcloud run services describe ...andcurl(direct URL → 403, LB domain → 200).github-staging (
terraform/environments/gcp/github-staging.tfvars)enable_cdn = trueto instantiate the LB stack.frontend_domain_names+dns_managed_zone_name.cloud_run_ingress = "INGRESS_TRAFFIC_ALL"line.gcloud run services describe ...andcurl(direct URL → 403, LB domain → 200).github-prod (
terraform/environments/gcp/github-prod.tfvars)enable_cdn = trueto instantiate the LB stack.frontend_domain_names+dns_managed_zone_name.cloud_run_ingress = "INGRESS_TRAFFIC_ALL"line.gcloud run services describe ...andcurl(direct URL → 403, LB domain → 200).References
RefsnotClosesbecause of this remaining workterraform/environments/gcp/variables.tf(variable definition + godoc)terraform/environments/gcp/dev.tfvars.exampleterraform/environments/gcp/github-dev.tfvarsterraform/environments/gcp/github-staging.tfvarsterraform/environments/gcp/github-prod.tfvarsterraform/modules/frontend/gcp/main.tf(LB stack module)Severity
Medium — defence-in-depth gap. Cloud Run is currently behind IAM-level auth only; a misconfigured IAM binding (e.g. an accidental
allUsers/allAuthenticatedUsersgrant) would expose the service directly to the public internet without a Load Balancer / Cloud Armor in front to absorb abuse.Effort per env
Medium — depends on whether DNS + cert are already provisioned.
devis the quickest (no production traffic, easiest to validate);github-prodrequires the most coordination (DNS cutover, monitoring, rollback plan).Why not a single PR
Each env's migration is operator-coordinated (DNS records, cert provisioning, traffic cutover validation) and breaks differently if it goes wrong. Better tracked as a checklist with one item closed per env than as a monolithic PR that has to land everywhere at once.