Managed Cloud Beta (M2)

StatusYear 2 beta — staging soak before production GA

> Cross-reference: product-plan-email-deliverability.md · feature-flags.md · infrastructure/terraform/aws-eks-tenant/


Scope

M2 enables paid Team, Business, or Enterprise managed cloud in staging/beta only:

  • Per-tenant EKS (anoobot-hosted) or BYO AWS cross-account role
  • SLA health probes + subscription lapse auto-offboard
  • Paid-only checkout UI (ManagedCloudSection)
  • No free/lite tenants on managed (enforced in M1 + M2)

Environment (staging beta)

# Enable managed beta control plane
MANAGED_BETA_ENABLED=true
VITE_ENABLE_MANAGED_CLOUD=true

# Live AWS/terraform (staging only until soak complete)
MANAGED_PROVISIONER_LIVE=true
ANOOBOT_MANAGED_BYO_ENCRYPTION_KEY=<32-byte-base64>

# Crons
DISABLE_MANAGED_LAPSE_CRON=false
DISABLE_MANAGED_SLA_CRON=false
MANAGED_LAPSE_CHECK_MS=300000
MANAGED_SLA_CHECK_MS=60000

Production (pre-GA): keep MANAGED_PROVISIONER_LIVE=false and MANAGED_BETA_ENABLED=false until external soak sign-off.


Staging soak checklist

Automated (local/CI): bash tools/scripts/validate-managed-beta-soak.sh

  1. [ ] Deploy gateway + registry to staging with .env.staging.example values
  2. [x] Run bash tools/scripts/validate-managed-beta-soak.sh (automated gates)
  3. [ ] Team plan checkout → anoobot_hosted → EKS tenant URL healthy
  4. [ ] BYO role ARN → cross-account provision → tenant URL healthy
  5. [ ] SLA cron records slaHealthy=true for 24h
  6. [ ] Cancel subscription → grace shortened → lapse cron offboards tenant
  7. [ ] Tenant isolation: domain A cannot read domain B deployment
  8. [x] Free plan blocked from managed checkout (API + UI) — covered by M1/M2 tests
  9. [ ] Document tenant URL + rollback in ops runbook

API endpoints (beta)

MethodPathPurpose
GET/api/v1/managed/beta-statusBeta flags + slab eligibility
GET/api/v1/managed/deployments/:domainIdDeployment + subscription status
POST/api/v1/billing/checkoutPaid managed checkout (Airwallex)
DELETE/api/v1/managed/deployments/:domainIdManual offboard

Subscription lapse → offboard

When Airwallex sends subscription.cancelled or payment fails:

  1. Billing shortens license expiry to grace window (BILLING_GRACE_PERIOD_DAYS, default 7)
  2. managedLapseCron scans active managed deployments
  3. If subscription status is cancelled / past_due / unpaid and license expiresAt is past → offboardManagedDeployment