Infrastructure as Code (IaC)
Infrastructure as Code (IaC) means creating and managing servers, networks, databases and other infrastructure through configuration files instead of clicking through a web console by hand. The files describe the desired setup, and a tool creates or updates the real infrastructure to match.
Because the files are kept in version control, infrastructure changes can be reviewed, repeated exactly, rolled back and shared between environments such as testing and production. Popular IaC tools are Terraform and OpenTofu, AWS CloudFormation, Pulumi, and Ansible for configuring servers.
resource "aws_instance" "web" {
ami = "ami-0abcdef1234567890"
instance_type = "t3.micro"
tags = {
Name = "web-server"
}
}