Interview Prep/Terraform/IaC and Terraform Fundamentals

What are the main block types in HCL?

BeginnerConceptIaC and Terraform Fundamentals
Answer

terraform, provider, resource, data, variable, locals, output, module, plus newer ones: moved, import, removed, check and ephemeral. Nested blocks inside resources (such as ingress in a security group) are provider-defined. Each top-level block has labels, for example resource "aws_vpc" "main" has type and name.

All Terraform questions Roadmap: Terraform

More on IaC and Terraform Fundamentals