Skip to content
Novus Examples
hcl

What is a .hcl file?

text/x-hcl

HCL (HashiCorp Configuration Language) is the block-structured configuration language behind Terraform, Packer, Nomad, Consul, and Vault. A document is a sequence of attributes (`name = expression`) and blocks (a type, zero or more string labels, and a braced body), with support for heredocs, function calls, conditionals, and for-expressions. It is designed to be both hand-written and machine-generated, and has a documented JSON-equivalent syntax.

How to use a .hcl file

Use an example .hcl file to test HCL parsers, configuration linters, and JSON-syntax converters, exercising nested blocks with multiple labels, heredoc indentation, and comment styles (`#`, `//`, and `/* */`).

Convert a .hcl file to another format

← All file formats