Skip to content

feat(terraform): deploy optional AI Gateway across clouds - #7412

Merged
benjaminshafii merged 5 commits into
devfrom
feat/7400-ai-gateway-terraform
Nov 14, 2026
Merged

benjaminshafii merged 5 commits into
devfrom
feat/7400-ai-gateway-terraform

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

What is this about?

Implement #7400: optional AI Gateway deployment for AWS ECS, Google Cloud Run and Azure Container Apps, plus first-class Helm wrapper inputs.

What problem does it solve?

Setting Gateway environment variables alone could expose administration pages without deploying an inference service or a desktop-reachable endpoint.

What was the situation before?

Helm already deployed the AI Gateway. Native Terraform modules did not; AWS's existing den-gateway was the separate OpenWork Web proxy.

How is this implemented?

  • Common off-by-default ai_gateway_enabled, hostname, digest-pinned image and HTTPS URL output; native service, routing and shared environment wiring.
  • Reuse existing database/encryption secrets and rotation counters. Cloud SQL's socket hostname is adapted only in serving-process memory.
  • Preserve Den's existing certificate on Cloud Run with a separate AI certificate.
  • The self-host wrapper delegates deployment to the existing chart and adds TLS ingress. No product flag or managed-installer default changes.

What else changed?

  • Module docs, provider pages and dual-tool CI coverage, including the wrapper and credential-free entrypoint checks.

Release note

Terraform operators can opt into an AI Gateway service with a dedicated HTTPS hostname while keeping existing secrets.

Evidence

infra/terraform/modules/*/tests/ai_gateway.tftest.hcl: default 0 services → enabled 1 → disabled 0; routing, secret preservation, unchanged plans and conflicts. No UI changes or desktop specs. Cloud providers are mocked; live cloud/managed-install conformance is NotRun. Details: infra/terraform/AI_GATEWAY_VERIFICATION.md.

Implement #7400 with a common off-by-default interface, HTTPS routing and existing database/encryption secret references. Keep den-gateway and managed installer defaults separate. Reuse the Helm deployment through first-class wrapper inputs, and normalize only the unused Cloud SQL socket hostname in serving-process memory.

Add mocked native plan coverage, default/unchanged/disable and conflict checks, plus a credential-free test of the exact Cloud SQL entrypoint against the production parsers. No live apply or provisioning is part of this change.

Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
Use explicit AI Gateway backend resources and whole-resource overrides, avoiding OpenTofu-incompatible indexed override targets and cross-run assertion references. Retain the Helm wrapper's existing Terraform 1.5 floor by checking cross-input conflicts on release preconditions, including operator-managed ingress paths.

Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
Attach a separate hostname-stable managed AI certificate on Cloud Run instead of mutating the immutable domain set of an existing Den certificate. Preserve supplied certificate ownership and add mocked upgrade/routing assertions for both certificate modes.

Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
Do not attach Den's Key Vault or unrelated user-assigned identities to the new AI Gateway. Hash its actual registry-only identity configuration for write-only secret updates, preserving the existing API/web identity paths and rotation counters. Add an offline identity-isolation plan assertion.

Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
Document common optional inputs, precise cloud networking/certificate prerequisites, stable secret ownership, naming and unchanged managed installer defaults for #7400. Record both CLI suites, observed plan values and explicit live NotRun gates without presenting mock plans as cloud qualification.

Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
openwork-app Ignored Ignored Nov 14, 2026 12:25am UTC
openwork-den Ignored Ignored Nov 14, 2026 12:25am UTC
openwork-diagnostics Ignored Ignored Nov 14, 2026 12:25am UTC
openwork-landing Ignored Ignored v0 Nov 14, 2026 12:25am UTC

Request Review

@mintlify

mintlify Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Nov 14, 2026, 12:26 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@benjaminshafii
benjaminshafii merged commit 36d6719 into dev Nov 14, 2026
26 checks passed

This branch was successfully deployed

1 active deployment
staging - packages/docs — 4e43235d Deployed Nov 14, 2026 by mintlify[bot]
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