move GCP external API ALB into gcp-host as a first-class option. - #1362
Merged
Conversation
Replace root external-api-alb.tf composition with gcp-external-api-alb invoked from gcp-host via external_api_alb, keeping BYO host support and optional Cloud Armor when IP blocks are set. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes GCP external API ingress via a global external Application Load Balancer (ALB) a first-class option of gcp-host, replacing the prior root-level example composition, while keeping bring-your-own (BYO) ALB support and making Cloud Armor optional (driven by allowed_data_access_ip_blocks when non-null).
Changes:
- Add
external_api_albtogcp-hostto provision a global external ALB (managed TLS withdomain, or self-signed PoC on a reserved global IP). - Introduce new
infra/modules/gcp-external-api-albmodule (ALB + optional Cloud Armor + TLS plumbing) and wire it fromgcp-host. - Update examples and documentation to reflect the new first-class ALB option and migration away from the old
external-api-alb.tfexample.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/modules/gcp-proxy-api/variables.tf | Clarifies when ingress_settings is driven by effective external ALB host. |
| infra/modules/gcp-host/variables.tf | Adds external_api_alb input and updates BYO ALB variable docs. |
| infra/modules/gcp-host/README.md | Documents optional beta ingress via provisioned or BYO external ALB. |
| infra/modules/gcp-host/output.tf | Adds outputs for provisioned ALB IP/DNS/self-signed cert and effective LB host. |
| infra/modules/gcp-host/main.tf | Reserves global IP, computes effective LB host, invokes new ALB module, adds XOR check, and adds tls provider requirement. |
| infra/modules/gcp-external-api-alb/variables.tf | New module inputs for ALB provisioning (domain, global IP, connector service names, allowlist). |
| infra/modules/gcp-external-api-alb/README.md | New module documentation and usage context. |
| infra/modules/gcp-external-api-alb/outputs.tf | New module outputs for host/IP, DNS instructions, and self-signed cert PEM. |
| infra/modules/gcp-external-api-alb/main.tf | New ALB implementation (NEGs, backend services, URL map, TLS via managed cert or self-signed, optional Cloud Armor). |
| infra/examples-dev/gcp/variables.tf | Adds external_api_alb example input and clarifies allowlist behavior with ALB. |
| infra/examples-dev/gcp/main.tf | Wires external_api_alb into the example and adds ALB-related outputs. |
| infra/examples-dev/gcp/external-api-alb.tf | Removes old root composition example for external ALB. |
| docs/guides/psoxy-test-tool.md | Updates testing guidance for ALB usage and allowlisting behavior. |
| docs/gcp/vpc.md | Updates ingress documentation reference to external_api_alb. |
| docs/development/gcp-private-service-connect.md | Updates Cloud Armor ingress guidance to new first-class option (and BYO). |
| docs/development/gcp-external-alb.md | Rewrites approach docs for gcp-host first-class ALB and migration guidance. |
| docs/configuration/ip-allowlisting.md | Updates allowlisting docs to reflect external_api_alb behavior and BYO ALB option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+9
to
+12
| tls = { | ||
| source = "hashicorp/tls" | ||
| version = "~> 4.0" | ||
| } |
aperez-worklytics
approved these changes
Jul 30, 2026
eschultink
commented
Jul 30, 2026
| output "api_connector_external_lb_host" { | ||
| description = "Effective external LB host for API connectors (provisioned ALB host/IP, BYO host, or null)." | ||
| value = local.api_connector_external_lb_host | ||
| } |
Member
Author
There was a problem hiding this comment.
as these all related, may must succicnet to group into a single output object?
Co-authored-by: aperez-worklytics <75276364+aperez-worklytics@users.noreply.github.com>
Spell out Application Load Balancer (ALB), split Cloud Armor docs, group ALB outputs, use tls >= 4.0 at gcp-host, and note the tls/migration implications in CHANGELOG and the PR description. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve gcp example main.tf conflict in favor of external_api_alb wiring, update troubleshooting away from deleted external-api-alb.tf, and reinforce beta status across ALB docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Features
external-api-alb.tfcomposition withgcp-external-api-albinvoked fromgcp-hostviaexternal_api_alb, keeping BYO host support and optional Cloud Armor when IP blocks are set.Change implications
hashicorp/tlsinto the root provider lockfile (gcp-hostrequirestls >= 4.0)external-api-alb.tfcomposition, destroy those root ALB resources orterraform state mvinto the newgcp-host/gcp-external-api-albaddresses before upgrading (see docs/development/gcp-external-alb.md and CHANGELOG)