Infrastructure and environments playbook
Rules for the infrastructure a service runs on. Infrastructure as code, environments, access, secrets, networks, policy, servers and cost, each with a check.
- Required 35
- Recommended 15
- Optional 1
An infrastructure playbook for anyone who sets up or changes the machines, networks and accounts a service runs on. It works the same on AWS, Google Cloud, Azure, a smaller host or one rented server. It is written for the developer or the AI agent who makes the change, and for the owner who has to trust it.
Most cloud breaches and surprise bills start with one hand-made change. Somebody opened a port, kept an old key or forgot a test server. These rules put every change in code, check it before it ships, and keep each environment and key apart.
Start with Infrastructure as code. Every other chapter assumes that changes go through code, review and CI. Then read Identity and access, because a leaked key does more harm than any other single mistake. If you run one server, read Servers next.
Running the service lives in the operations playbook, including monitoring, backups, recovery and containers. Building and deploying the app lives in the engineering playbook. Attacks and their fixes live in the adversarial testing playbook.
Chapters
Infrastructure as code
Create every resource from code in version control. Keep state locked and encrypted, review each plan, apply only from CI and catch drift daily.
- Required 6
- Recommended 3
Environments
Give each environment its own account, build them all from the same code, change staging before production, and delete preview copies on time.
- Required 4
- Recommended 2
Identity and access
Sign people in through one identity provider, give every role the least it needs, keep no long-lived keys, and lock the root account away.
- Required 6
- Recommended 1
Configuration and secrets
Keep settings in code and secrets in a store. Keep secrets out of state, let CI and services sign in with short-lived identity, and rotate on a timer.
- Required 4
- Recommended 1
Networking and DNS
Keep databases private, open only the ports you name, close admin ports to the internet, limit outbound traffic, force TLS and keep DNS in code.
- Required 6
- Recommended 2
Policy as code
Scan infrastructure code on every change, test your own rules against the plan, block dangerous actions at the organization level, and let exceptions expire.
- Required 2
- Recommended 3
Servers
Replace servers instead of changing them by hand. Rebuild any server from code, install security updates by themselves, and close every port you do not use.
- Required 5
- Recommended 1
Cost and ownership
Tag every resource with its owner, give every account a budget with alerts, delete what sits idle, and size servers from what they use.
- Required 2
- Recommended 2
- Optional 1
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers infrastructure playbook: https://agentwranglers.se/playbook/infrastructure.