Free — no signup required

The Vending Machine Model

2 min read

The "Golden Path" is a Module

How do you ensure every new microservice follows the rules? You stop letting people create them manually.

In a mature platform, you remove the "Create Repository" button from the GitHub UI — or at minimum, you make it culturally clear that using it directly is the wrong path. Instead, you provide a Terraform Module (or a Backstage Software Template) that acts as a "Vending Machine." A developer puts in their request (service name, team, cost center), and the machine dispenses a fully compliant repository.

The Module Logic:
When a developer calls module "new_service", the platform automatically:

  1. Creates the GitHub Repository.
  2. Governance: Sets visibility to private.
  3. Governance: Enables Branch Protection (requires 2 reviewers).
  4. Governance: Commits a default ci.yaml pipeline file.
  5. Governance: Sets up the team's access permissions.
  6. Governance: Applies required metadata tags (cost center, team, environment).

The developer gets their repository in minutes, and the Security Team can sleep knowing it is structurally impossible to create a repository without these protections — because the only sanctioned path to creation includes them.

Why Modules Are Better Than Checklists

A checklist relies on a human remembering to check every box. A module makes the checklist irrelevant: the correct configuration is the only output the module can produce. This is the difference between a detective control (finding violations after the fact) and a preventive control (making violations impossible in the first place). Mature governance systems use both.

Interview Tip

Interviewers often ask: "How do you enforce security standards without slowing down developers?" The answer is the vending machine model: you make the compliant path the easiest path. Developers don't want to fight security — they want to ship. If the compliant module is faster than doing it manually, adoption is organic. Frame your answer around reducing friction, not adding gates.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free