Infrastructure as Code (IaC)
A B C D E F G H I K L M N O P Q R S T U V W Z

What Is Infrastructure as Code?

Infrastructure as Code (IaC) is the practice of managing and provisioning computing infrastructure through machine-readable configuration files rather than through manual processes or interactive configuration tools. With IaC, the desired state of servers, networks, databases, and other infrastructure components is defined in code, version-controlled in repositories, and deployed through automated pipelines.
IaC treats infrastructure with the same discipline applied to application code: changes are reviewed, tested, version-controlled, and deployed consistently, eliminating the manual configuration drift and undocumented dependencies that accumulate in manually managed environments.

Declarative vs. Imperative IaC Approaches

Declarative IaC defines what the infrastructure should look like in its final state, and the tool determines how to get there. Terraform and AWS CloudFormation use declarative approaches. The code describes the desired end state; the tool calculates and applies the necessary changes.
Imperative IaC specifies the exact sequence of steps required to configure infrastructure. Shell scripts and Ansible playbooks in procedural mode take this approach. Imperative code is more flexible for complex conditional logic but requires the author to manage change ordering and idempotency explicitly.

Popular IaC Tools

Terraform by HashiCorp is the most widely adopted multi-cloud IaC tool, using its own configuration language (HCL) to provision and manage resources across AWS, Azure, GCP, and many other providers. Pulumi enables infrastructure definition using general-purpose programming languages including Python, TypeScript, and Go. Cloud-native options include AWS CloudFormation, Azure Resource Manager (ARM) templates and Bicep, and Google Cloud Deployment Manager.

Business Benefits of Adopting IaC

Key Takeaways

Scroll to Top