Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

HCL

< >

HCL, aka HashiCorp configuration language, is an open source data notation created in 2014.

#72on PLDB 10Years Old 180kRepos
Download source code:
git clone https://github.com/hashicorp/hcl
REPL · Source Code · Docs

HCL (HashiCorp Configuration Language) is a configuration language built by HashiCorp. The goal of HCL is to build a structured configuration language that is both human and machine friendly for use with command-line tools, but specifically targeted towards DevOps tools, servers, etc. HCL is also fully JSON compatible. That is, JSON can be used as completely valid input to a system expecting HCL. This helps makes systems interoperable with other systems. HCL is heavily inspired by libucl, nginx configuration, and others similar.


Example from the web:
variable "ami" { description = "the AMI to use" } <<FOO hello world FOO
Example from Riju:
output = "Hello, world!"
Example from Linguist:
consul = "1.2.3.4" // This is a comment template "foo" { bar = "zip" }
var local path for_each any string number bool true false null if else endif for in endfor

Language features

Feature Supported Example Token
Conditionals
Booleans true false
MultiLine Comments /* A comment */ /* */
Strings
Comments // A comment
Line Comments // A comment //
Semantic Indentation X

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v164.7.0