Version control and review Required
Keep every change in version control
Keep code, settings, build scripts, infrastructure and database changes in version control. Only secrets stay out.
How to do it
Use one repository per product, such as a Git repository. Commit server settings and deploy scripts next to the code, so any copy can be rebuilt from history. Keep secrets in a secret store or environment variables instead.
How to check
A fresh clone, plus the secrets, builds and deploys the product with no manual steps. A secret scanner finds no keys in the history.
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 engineering playbook: https://agentwranglers.se/playbook/engineering/version-control-and-review/everything-in-version-control.