Skip to content

feat: dual-mode GCP vm-rs service + gcp load_balancer modules#369

Merged
anshulsao merged 2 commits into
mainfrom
feat/gcp-vm-rs-and-load-balancer
Jul 3, 2026
Merged

feat: dual-mode GCP vm-rs service + gcp load_balancer modules#369
anshulsao merged 2 commits into
mainfrom
feat/gcp-vm-rs-and-load-balancer

Conversation

@anshulsao

Copy link
Copy Markdown
Contributor

What

Two new dual-mode GCP modules (greenfield provision and zero-change import/adoption of an existing estate), plus the @facets/gcp-load-balancer output type.

module intent/flavor what
modules/service/vm-rs/1.0 service / vm-rs VM-backed service modelled as Deployment / StatefulSet on raw GCE VMs (zonal + regional PD, shielded, per-replica placement). Boot image is an artifact input (Packer/GCE image → CI → release replaces the VM). Output @facets/service.
modules/load_balancer/gcp/1.0 load_balancer / gcp Global external/internal HTTP(S) L7 LB stack (address → forwarding rule → proxy → url map → backend service → unmanaged instance group, + optional :80→:443 redirect). Managed-cert greenfield path + 0-change adoption. Output @facets/gcp-load-balancer (new, under outputs/).

Dual mode

Both select behaviour by whether the imports.* pins are set:

  • empty → greenfield: vm-rs provisions fresh VMs+disks; load_balancer creates the IP + a managed SSL cert + the full stack.
  • set → adopt: reproduces an existing hand-rolled estate 0-change via targeted ignore_changes on the volatile/computed/ForceNew attributes; foundation (static IP, SSL certs) is referenced, never created.

Provenance / testing

Both modules were built and hardened adopting a full production GCP estate — 44 standalone VMs + 28 LB stacks — at a verified 0-change (0 add/change/destroy), then greenfield-validated in a fresh region (VM + full LB stack create cleanly, zero import blocks). Generalized here (no customer-specific values).

Placement / taxonomy — maintainer input welcome

  • load_balancer/gcp — placed under the first-class load_balancer intent to match modules/load_balancer/vultr. ✅
  • service/vm-rs — kept as intent: service (a VM-backed service, deliberately modelled Deployment/StatefulSet for a clean path to MIG/GKE later), with a functional flavor vm-rs alongside the cloud-named service flavors. Alternative: intent: compute / flavor: gcp (there is a modules/compute/vultr). Happy to move it if you prefer that taxonomy.
  • output.facets.yaml is gitignored per repo convention; the LB output type lives in outputs/gcp-load-balancer/outputs.yaml.
  • version.tf pins hashicorp/google (module resources) + Facets-cloud/facets.

Still to do before un-drafting

  • Validate against a GCP project-type in CI (raptor module validate).
  • Confirm final intent/flavor taxonomy per above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RsiV1JkMqt96ZQb1brv4zq

anshulsao and others added 2 commits July 3, 2026 11:57
Two new GCP modules, both dual-mode (greenfield provision AND zero-change
import/adoption of an existing estate):

- modules/service/vm-rs — VM-backed service modelled as Deployment/StatefulSet
  on raw GCE VMs (zonal + regional PD, shielded, per-replica placement). Boot
  image is an artifact input (Packer/GCE image → CI → release replaces the VM).
- modules/load_balancer/gcp — global external/internal HTTP(S) L7 LB stack
  (address → forwarding rule → proxy → url map → backend service → unmanaged
  instance group), managed-cert greenfield path + 0-change adoption of
  hand-rolled stacks. Placed under the load_balancer intent to match
  modules/load_balancer/vultr.

Battle-tested adopting a full production GCP estate (44 standalone VMs + 28 LB
stacks) at 0-change, and greenfield-validated in a fresh region. Generalized
(no customer-specific values).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RsiV1JkMqt96ZQb1brv4zq
…at it

Replaces the @custom/load_balancer placeholder with a proper repo-convention
output type under outputs/, matching outputs/vultr-load-balancer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RsiV1JkMqt96ZQb1brv4zq
@anshulsao
anshulsao marked this pull request as ready for review July 3, 2026 07:05
@anshulsao
anshulsao merged commit 2ff7227 into main Jul 3, 2026
1 check passed
@anshulsao
anshulsao deleted the feat/gcp-vm-rs-and-load-balancer branch July 3, 2026 07:05
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.

1 participant