NEW
Also known as: IaC
Infrastructure as Code manages and provisions computing infrastructure using declarative, version-controlled code rather than manual configuration.
DESCRIPTION
Infrastructure as Code (IaC) codifies infrastructure definitions so environments are reproducible, testable, and traceable. It improves reliability through automation, reduces configuration drift, and accelerates delivery via CI/CD. Declarative templates or modules define desired state, while tools reconcile actual state. IaC integrates with Git for version control and peer review. Common tools include Terraform, CloudFormation, and Ansible. IaC supports immutable infrastructure patterns and facilitates compliance by auditable change history. It enables consistent multi-cloud deployments. IaC is foundational to modern DevOps and platform engineering.
ALTERNATIVE DEFINITIONS
Wikipedia
Infrastructure as code (IaC) is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.
Highlights machine-readable definition files replacing manual configuration.
Red Hat
Infrastructure as code (IaC) is the managing and provisioning of infrastructure through code instead of through manual processes.
Stresses replacing manual processes with automation via code.
Microsoft Learn
Infrastructure as code (IaC) is the process of managing and provisioning computing infrastructure through machine-readable definition files.
Aligns IaC with DevOps practices and version-controlled definitions.
HashiCorp
Infrastructure as code is the practice of managing and provisioning infrastructure through code instead of manual processes.
Emphasizes declarative workflows and reproducibility using Terraform.
RELATED TERMS
Terraform AWS CloudFormation Ansible Kubernetes GitOps Configuration Management CI-CD Immutable Infrastructure Declarative Configuration Puppet
COMPETING TERMS
ClickOps Manual Configuration
RELATIONS
- Narrower: AWS CloudFormation
KNOWLEDGE AREAS
Infrastructure Cloud Platform & Tooling Software Engineering Data Engineering
TARGET AUDIENCE
DevOps Engineer Cloud Architect Software Developer Data Engineer MLOps Engineer Enterprise Architect Chief Technology Officer
EXTERNAL SOURCES
- Wikipedia - Infrastructure as code
- HashiCorp - Terraform introduction to IaC
- AWS - CloudFormation IaC service docs
- Microsoft - Azure Resource Manager overview
- Ansible - Ansible playbooks for IaC
TOP QUESTIONS
Why is Infrastructure as Code important for reliability?
IaC reduces configuration drift and enforces repeatable deployments. Version control enables peer review and rollback. Automated provisioning lowers human error and improves consistency across environments.
Category: Relevancy
How does Infrastructure as Code integrate with CI/CD?
IaC templates are tested and applied via pipelines. Changes to code trigger validation, plan previews, and automated deployments, aligning infrastructure changes with application releases.
Category: Requirements
What are common mistakes with Infrastructure as Code?
Hardcoding secrets, skipping state management, and lacking idempotency cause failures. Insufficient testing and missing drift detection create instability. Inconsistent naming complicates governance.
Category: Mistakes
How do you manage secrets in Infrastructure as Code?
Use secret managers like AWS Secrets Manager or Vault. Avoid storing secrets in repos. Reference secrets via parameters and enforce least privilege access policies.
Category: Risk
What’s the difference between declarative and imperative IaC?
Declarative defines desired end state; tools converge automatically. Imperative scripts specify step-by-step actions. Declarative approaches typically simplify drift detection and reproducibility.
Category: Misunderstanding
Which tools are commonly used for Infrastructure as Code?
Terraform, AWS CloudFormation, Azure Bicep/ARM, Ansible, and Pulumi are common. Choice depends on cloud targets, language preferences, and organizational standards.
Category: Overview
How does Infrastructure as Code support compliance?
IaC provides auditable change histories and reviews. Policies-as-code enforce standards at build and deploy time, enabling continuous compliance and automated guardrails.
Category: Requirements
Is Infrastructure as Code suitable for multi-cloud?
Yes. Tools like Terraform and Pulumi offer providers across clouds. Abstracting modules enables consistent patterns while accommodating cloud-specific features.
Category: Opinion
What is an alternative to Infrastructure as Code?
ClickOps relies on manual console changes. It’s fast for ad-hoc tasks but lacks traceability, reproducibility, and automation—creating risks at scale.
Category: Alternatives