Infrastructure and environments checklist
Every rule in the infrastructure and environments playbook, by chapter, required rules first. Each links to its own page with how we built it and how to check it. This is a lot to check. An Expert can check it for you.
Infrastructure as code
- Required INF-2 Keep state remote with locking and encryption
- Required INF-3 Review the plan and apply only from CI
- Required INF-8 Protect resources that hold data
- Recommended INF-1 Define every resource in code
- Recommended INF-4 Pin the tool and provider versions
- Recommended INF-5 Split state by environment and layer
- Recommended INF-6 Reuse versioned modules
- Recommended INF-7 Detect drift every day
- Recommended INF-9 Bring hand-made resources under code
Environments
- Recommended INF-10 Give each environment its own account
- Recommended INF-11 Build every environment from the same code
- Recommended INF-12 Change staging before production
- Recommended INF-13 Delete preview environments on time
- Recommended INF-14 Start every account from one baseline
Identity and access
- Required INF-16 Sign people in through single sign-on
- Required INF-17 Keep no long-lived access keys
- Required INF-18 Give every role the least it needs
- Required INF-20 Lock the root account away
- Required INF-59 Block sharing outside the organization
- Required INF-70 Name the caller in every trust you give a vendor or a service
- Required INF-85 Keep one audit trail for the whole organization that no account can change
- Recommended INF-19 Separate the roles for plan and apply
- Recommended INF-21 Keep tested break-glass accounts
- Recommended INF-22 Grant admin access for hours only
- Recommended INF-15 Turn on threat detection in every account
Configuration and secrets
- Required INF-24 Keep secrets out of state
- Recommended INF-23 Create the secret's place in code and its value in the store
- Recommended INF-25 Let CI sign in with OIDC
- Recommended INF-26 Give services the identity of their machine
- Recommended INF-27 Rotate secrets automatically
Networking and DNS
- Required INF-29 Keep databases in private subnets
- Required INF-30 Deny all traffic unless a rule allows it
- Required INF-31 Close admin ports to the internet
- Required INF-33 Force encryption on every managed service
- Required INF-34 Require tokens for the metadata service
- Required INF-37 Authenticate calls between your own services
- Recommended INF-32 Limit where servers can send traffic
- Recommended INF-35 Keep DNS records in code
- Recommended INF-36 Shorten the TTL before you move a record
- Recommended INF-71 Let only your edge network reach the origin
- Recommended INF-86 Put a web application firewall and flood protection in front of public services
- Recommended INF-87 Reach managed services over private endpoints
Policy as code
- Recommended INF-38 Scan infrastructure code on every change
- Recommended INF-39 Test your own rules against the plan
- Recommended INF-40 Block dangerous actions for the whole organization
- Recommended INF-41 Let every exception expire
- Recommended INF-42 Test infrastructure modules
Servers
- Required INF-46 Install security updates by themselves
- Required INF-48 Allow SSH with keys only
- Recommended INF-43 Replace servers instead of patching them
- Recommended INF-44 Configure long-lived servers from code
- Recommended INF-45 Rebuild any server from code
- Recommended INF-47 Turn on a firewall on every host
- Recommended INF-49 Keep server clocks in sync
- Recommended INF-50 Remove services the server does not need
- Recommended INF-51 Check server images against a hardening checklist
Cost and ownership
- Required INF-53 Give every account a budget with alerts
- Recommended INF-52 Tag every resource with its owner
- Recommended INF-54 Delete resources that sit idle
- Recommended INF-55 Size servers from what they use
- Recommended INF-72 Track cost per request
- Optional INF-56 Show the cost of each change in review
- Optional INF-57 Buy commitment discounts for steady use
- Optional INF-69 Track carbon per request beside cost
Hosting platforms
- Required INF-62 Test the service against every platform limit
- Required INF-64 Keep production data and secrets out of previews
- Required INF-68 Own the domain and DNS in your own accounts
- Recommended INF-61 Choose the hosting model from written needs
- Recommended INF-65 Choose regions from users and data rules
- Recommended INF-89 Record which governments can demand each provider's data
- Recommended INF-66 Price data transfer and per-request charges before launch
- Recommended INF-60 Upgrade managed engines before standard support ends
- Recommended INF-88 Track cloud quotas before they block a scale-up
- Recommended INF-67 Keep an exit plan for each platform
Containers and orchestration
- Required INF-73 Run containers as a user without root
- Required INF-74 Never give a container control of the host
- Required INF-76 Publish only the ports visitors use
- Required INF-78 Probe every Kubernetes workload for readiness and liveness
- Required INF-79 Set resource requests and a memory limit on every container
- Required INF-81 Deny pod traffic by default with network policies
- Required INF-82 Enforce the restricted pod security standard
- Recommended INF-75 Make the container file system read-only
- Recommended INF-77 Put each container only on the networks it needs
- Recommended INF-80 Keep enough copies running through planned disruptions
- Recommended INF-83 Deploy only signed images from tags that cannot move
- Recommended INF-84 Rescan the images that are running every day
Related playbooks
Show the badge on your project
When your project passes every Required rule, you can show this badge on your site or in your README. It links to this checklist, so anyone can run the same checks.
<a href="https://agentwranglers.se/playbook/infrastructure/checklist"><img src="https://agentwranglers.se/badge.svg" alt="Checked against the Agent Wranglers infrastructure and environments playbook" width="214" height="20"></a>
[](https://agentwranglers.se/playbook/infrastructure/checklist)
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/infrastructure/checklist">Agent Wranglers infrastructure and environments playbook</a>. In code you write, add a comment next to it with the same link.