In the preceding chapter, I covered the fundamental practices for infrastructure as code. Even though I knew the fundamental practices, my first Python automation script grouped code into one file with messy functions. Years later, I learned software design patterns. They provided a standard set of patterns that made it easier for me to change the script and hand it over to another teammate for maintenance.
In the following two chapters, I show how to apply design patterns to IaC configuration and dependencies. Software design patterns help you identify common problems and build reusable, object-oriented solutions.