This chapter covers
- Learning from software development
- Developing locally as a team
- Code quality tools
- Securing infrastructure
- Automating chores
- Ensuring quality automatically
Infrastructure as code (IaC) provides a number of benefits, but one of the biggest is that it allows the industry to apply the lessons learned from decades of software development to managing infrastructure. Software development has been around since the 1950s, and it’s an understatement to say that it has evolved quite a bit since then. Not only have the languages software developers used grown to take on new complexity and functionality, but the tools they use have also grown to make tackling that complexity feasible.
When developing using the Terraform and OpenTofu languages, you are developing software. Developing high-quality software is not a trivial task though. To make it easier, developers rely on tools, such as code linters (tools that look through your code for problems), formatters, and security scanners. Terraform is no exception to this. When working with Terraform, you have a number of tools at your disposal to help you create better software.
What exactly is high-quality software? Although this is by itself a huge topic, high-quality software has a few common features that make the project more pleasant to work with: