HCL

HashiCorp Configuration Language: the block-based configuration syntax of Terraform files, which end in .tf.

In more detail

Files are made of blocks such as resource, variable and output, each with arguments written as name = value. Values in HCL may come from variables, modules and data sources that are unknown until plan time, which limits what a static scan can prove.

Examples

block_type "label" "another_label" {
  argument = expression
}
In Terraform: A block has a type, zero or more labels in quotes, and a body in braces; inside, each argument is a name, an equals sign and an expression. Blocks can nest, but the order of blocks and files means nothing, because Terraform works out the order from references. Strings use double quotes only, and comments start with #.

Related terms

Taught in

References

Certification courses