Declarative infrastructure as code

Declarative infrastructure as code describes the desired state of the infrastructure in files, rather than the steps to get there. With Terraform, you write the desired resources in HCL, and the tool compares them with the real state to compute the changes. The configuration is versioned and reproducible.

Example

resource "aws_s3_bucket" "logs" { bucket = "mon-bucket-logs" }

Related concepts

The whole glossary