Why it matters
Clicking through a cloud console is fine for learning, but at work it causes problems: nobody remembers exactly what was clicked, test and production drift apart, and rebuilding after a disaster is guesswork. Infrastructure as code (IaC) means describing servers, networks and databases in text files kept in Git. Ghanaian DevOps adverts name Terraform and AWS CloudFormation often, and telco and bank cloud roles list IaC directly.
How it works
You write what you want, not the clicks to get there. The tool compares your files with what exists and makes only the changes needed. Because the files live in Git, every change is reviewed in a pull request, and you can rebuild the whole setup from scratch.
Common tools:
- Terraform (and its open source fork OpenTofu) works with AWS, Azure, Google Cloud and many other services.
- AWS CloudFormation, Azure Bicep and Google's tools work with their own clouds.
- Ansible is often used next to them for configuration management: installing and configuring software on servers that already exist.
The Terraform cycle
Terraform uses four main commands: