Skip to content

move GCP external API ALB into gcp-host as a first-class option. - #1362

Merged
eschultink merged 4 commits into
rc-v0.6.9from
s230-alb-wo-fixed-ip
Jul 30, 2026
Merged

move GCP external API ALB into gcp-host as a first-class option.#1362
eschultink merged 4 commits into
rc-v0.6.9from
s230-alb-wo-fixed-ip

Conversation

@eschultink

@eschultink eschultink commented Jul 30, 2026

Copy link
Copy Markdown
Member

Fixes

  • alb example ONLY works with fixed ips

Features

  • 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.

Change implications

  • dependencies added/changed? yes — enabling the ALB (self-signed PoC path) may pull hashicorp/tls into the root provider lockfile (gcp-host requires tls >= 4.0)
  • something important to note in future release notes? yes — if you initially applied the old root external-api-alb.tf composition, destroy those root ALB resources or terraform state mv into the new gcp-host / gcp-external-api-alb addresses before upgrading (see docs/development/gcp-external-alb.md and CHANGELOG)

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_alb to gcp-host to provision a global external ALB (managed TLS with domain, or self-signed PoC on a reserved global IP).
  • Introduce new infra/modules/gcp-external-api-alb module (ALB + optional Cloud Armor + TLS plumbing) and wire it from gcp-host.
  • Update examples and documentation to reflect the new first-class ALB option and migration away from the old external-api-alb.tf example.

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"
}
Comment thread docs/guides/psoxy-test-tool.md Outdated
Comment thread docs/development/gcp-external-alb.md Outdated
Comment thread docs/configuration/ip-allowlisting.md Outdated
Comment thread docs/configuration/ip-allowlisting.md Outdated
Comment thread docs/development/gcp-external-alb.md Outdated
Comment thread docs/development/gcp-external-alb.md Outdated
Comment thread docs/development/gcp-external-alb.md Outdated
Comment thread infra/modules/gcp-external-api-alb/main.tf Outdated
Comment thread infra/modules/gcp-external-api-alb/main.tf Outdated
Comment thread infra/modules/gcp-external-api-alb/outputs.tf Outdated
Comment thread infra/modules/gcp-host/main.tf Outdated
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
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as these all related, may must succicnet to group into a single output object?

eschultink and others added 3 commits July 30, 2026 06:41
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>
@eschultink
eschultink merged commit d6996eb into rc-v0.6.9 Jul 30, 2026
120 checks passed
@eschultink
eschultink deleted the s230-alb-wo-fixed-ip branch July 30, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants