IaC Fundamentals: Terraform & Ansible Vocabulary

A beginner-friendly introduction to the core vocabulary of Infrastructure as Code: Terraform basics, Ansible playbooks, IaC documentation, and drift terminology, explained in plain language.

Looking for the advanced track? This page covers entry-level IaC vocabulary. For workplace-scenario exercises on state management, module design, policy-as-code, and cloud provider trade-offs, see Infrastructure as Code — Deep Dive.

Frequently Asked Questions

What exactly is a 'Provider' in Terraform? I've seen it mentioned a lot.

In Terraform, a Provider represents an infrastructure service like AWS, Azure, or Google Cloud. It allows Terraform to interact with that service, understanding its APIs and resources. Essentially, the provider bridges the gap between your Terraform configuration and the cloud platform's services.

Can you explain 'state' in Terraform? Why is it so important?

'State' is a file (typically `.terraform/state.tfstate`) that Terraform uses to track the current infrastructure resources it manages. It contains information about each resource, its attributes, and its relationships – this allows Terraform to make changes predictably and consistently without needing constant API calls.

What's the difference between a 'module' and an 'inventory' in Ansible?

An Ansible module is a reusable unit of configuration code, often written in Python, that performs a specific task like creating a file or installing a package. An inventory defines the target machines (hosts) where you want to execute your Ansible playbooks; it lists the servers and their connection details.