Infrastructure as Code (IaC)
Infrastructure as Code (IaC) is a DevOps practice in which infrastructure resources, such as servers, networks, databases, and configurations, are managed and provisioned using machine-readable code files rather than manual processes. This enables the automation, consistency, and repeatability of infrastructure deployment across environments.
With IaC, infrastructure setups are defined in configuration files using languages such as YAML, JSON, HCL (HashiCorp Configuration Language), or domain-specific tools like Terraform, Ansible, or AWS CloudFormation. These files act as the source of truth and can be version-controlled, tested, and reused, just like application code.
IaC makes it possible to:
- Automatically deploy infrastructure across development, testing, and production environments
- Enforce configuration consistency and compliance
- Minimise human error and configuration drift
- Integrate infrastructure changes into CI/CD pipelines
IaC is widely used in cloud-native environments (e.g. AWS, Azure, Google Cloud Platform) where rapid provisioning and scaling are essential. It supports agile development by aligning infrastructure management with modern software development practices.
See also: DevOps, Cloud services