This document introduces infrastructure as code and automation using Chef. It discusses how Chef can be used to manage infrastructure complexity through policy-driven configuration management. Chef defines the desired state of systems using recipes, cookbooks and roles. Nodes running the Chef client converge themselves to the desired state defined in policies. Search is used to query nodes and topology data, which can then be passed to templates to dynamically generate configurations. This allows infrastructure to be automated, standardized and maintained as code.