Skip to content

Lesson 4 of 9 · 27m

Designing Self-Service Infrastructure Without Losing Control

Expose infrastructure as constrained products with explicit inputs, ownership, lifecycle behavior, and controls rather than raw cloud access by ticket.

Self-service infrastructure does not mean giving every developer a cloud account and a stern look. It means productizing the small set of infrastructure capabilities teams repeatedly need, with defaults tight enough that a tired engineer can get the right answer quickly. The platform becomes a menu with prices, ingredients, and a kitchen — not an open invitation to wander into the walk-in freezer with a soldering iron.

Start with capabilities, not cloud resources

Developers rarely want "a subnet." They want a database, a queue, object storage, a workload identity, a DNS name, or a preview environment. Express offerings at that level:

apiVersion: platform.example/v1alpha1
kind: PostgresDatabase
metadata:
  name: billing-db
spec:
  size: small
  environment: production
  owner: billing-team
  backup: standard
  deletionProtection: true

This interface hides instance classes, subnet placement, parameter groups, backup schedules, encryption keys, and network policy. Those details still exist — they are just platform decisions, not repeated user homework.

The input contract is the security boundary

Every input you accept increases the support surface. Keep initial contracts small and explicit:

name            unique, DNS-safe, stable
environment     dev, staging, production
size            small, medium, large — not raw instance types
owner           team identity, not an individual email
data class      public, internal, confidential if relevant
lifecycle       ephemeral, persistent, archive-on-delete

When someone asks for arbitrary instance type selection, the correct product question is not "why not?" It is "what workload need does small/medium/large fail to represent?"

Terraform belongs behind the product interface

A common implementation is Terraform modules driven by a controller or workflow. The module interface should mirror the product contract:

module "postgres" {
  source  = "git::ssh://git@example.internal/platform/postgres.git?ref=v3.8.1"
  name    = "billing-db"
  env     = "production"
  size    = "small"
  team    = "billing-team"
  backup  = "standard"
  protect = true
}

Do not expose the full module variable surface unless you enjoy supporting every permutation. Sensible defaults are not paternalism; they are how you keep operational knowledge in one place.

Lifecycle is part of the feature

Provisioning is the easy demo. Real infrastructure has drift, backup restore, resize, credential rotation, decommissioning, dependency mapping, and cost allocation. The offering must answer:

how is access granted and revoked?
how are secrets delivered and rotated?
how is backup restoration requested and tested?
what happens when the owning team dissolves?
how does the resource get labeled for cost?
what destroys the resource, and what prevents accidental destruction?

If those answers are manual tickets, you did not build self-service infrastructure. You built self-service creation with outsourced lifecycle debt.

Blast radius shapes the interface

Production databases, public DNS, IAM, and network changes deserve different controls than ephemeral preview namespaces. Tiered environments and approval policies are normal. The trick is to put friction where blast radius justifies it, not evenly across every action. A dev sandbox should be nearly instant; a production data service can require stronger identity and an auditable change record.

Field notes

  • Raw cloud access usually reappears through exceptions; track why and fold repeated needs back into the product.
  • "Self-service" without an owner field is an orphan resource generator.
  • Cost labels are part of provisioning correctness, not finance hygiene added later.
  • Never let deletion protection depend on memory. Encode it in the resource contract.

Was this lesson helpful?

Sign in to rate