HCL block

A container in HCL written as a type, optional quoted labels and a body in braces, such as resource "local_file" "greeting" { }.

In more detail

The type, such as resource, variable or output, decides how many labels it needs and what may go inside. Blocks can contain arguments and other nested blocks, such as validation inside variable or lifecycle inside resource.

Related terms

Taught in

References

Certification courses