Infrastructure-as-code tools let you define servers, networks, and cloud resources in version-controlled text instead of clicking through consoles. These three are the most common starting points, each with a different sweet spot.

Ansible

Pros:

  • Agentless: Connects over SSH, so nothing needs to be installed on managed hosts.
  • Simple YAML Syntax: Playbooks are readable and quick to learn.
  • Large Community: Extensive collections of ready-made roles and modules.

Cons:

  • Performance: Can be slower for very large deployments.
  • Limited State Management: Describes steps rather than tracking the resulting state, so drift detection is weaker than in Terraform.

Terraform

Pros:

  • Declarative Language: You describe the desired end state and Terraform works out the changes.
  • State Management: Tracks deployed resources, enabling planning and drift detection.
  • Multi-Cloud Support: Providers exist for every major cloud and many other services.

Cons:

  • HCL Learning Curve: Requires learning HashiCorp Configuration Language.
  • State File Management: Protecting and sharing the state file adds operational complexity.
  • Licensing Change: Terraform moved from open source to the Business Source License in 2023, prompting the community-driven OpenTofu fork — worth considering if open-source licensing matters to you.

CloudFormation

Pros:

  • Native to AWS: Deep integration with AWS services, with no separate state file to manage.
  • Nested Stacks: Supports composing large deployments from reusable templates.

Cons:

  • AWS-Only: No use outside AWS, so skills and templates don't transfer.
  • Verbose Syntax: JSON/YAML templates grow large and repetitive for complex stacks.

More reference topics

  • Learning to Script — The six things that reliably stall a new scripter, with worked examples of how to get past them.
  • Hypervisors — Comparing the three hypervisors you are most likely to run, plus optimisation and live video handling.
  • Linux — Choosing between the three most common server distributions, and the system knowledge that applies whichever you pick.
  • CI/CD Pipelines — The case for automating your build and deploy, the common ways it goes wrong, and what good practice looks like.
  • IoT — The open-source platforms worth knowing, and an honest look at what IoT delivers and what it risks.
  • GitHub — Pull, push, commit, merge, squash and branch — plus the conventions that stop a shared repository turning into a mess.
  • AI Practices — How to use AI coding assistants so they multiply what you can build, rather than handing you code you cannot debug.
  • Cookies & Storage — Two browser storage mechanisms, constantly confused: what each is for, and how both get abused.
  • Browser Stats — A live read-out of what this page can see about your browser — the same things every other site can.

Support Me

If you find my work interesting, please consider supporting me.