Infrastructure as Code (IaC): Systems Automation

IaC is the practice of managing and provisioning infrastructure through machine-readable definition files, rather than manual hardware configuration or interactive web consoles.

1. Declarative vs. Imperative Paradigms

2. State Management

The tool must know what exists in the cloud to calculate changes.

3. Concrete Implementation: Terraform

Terraform uses HCL (HashiCorp Configuration Language).

resource "aws_s3_bucket" "data" {
  bucket = "my-secure-data-bucket"
  
  versioning {
    enabled = true
  }

  server_side_encryption_configuration {
    rule {
      apply_server_side_encryption_by_default {
        sse_algorithm = "AES256"
      }
    }
  }
}

4. Policy as Code (PaC)

Integrate security into the IaC pipeline.


See Also: