2 Writing infrastructure as code

This chapter covers

  • How the current infrastructure state affects the reproducibility of infrastructure
  • Detecting and remediating infrastructure drift due to mutable changes
  • Implementing best practices for writing reproducible infrastructure as code

Imagine you’ve created a development environment for a hello-world application. You built it organically, adding new components as you needed them. Eventually, you need to reproduce the configuration for production use, which people can publicly access. You also need to scale production across three geographic regions for high availability.

To do this, you must create and update firewalls, load balancers, servers, and databases in new networks for the production environment. ...

Get Infrastructure as Code, Patterns and Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.