hcl
HashiCorp Configuration Language (HCL)
The description below is taken from the HCL git repository’s README:
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 support within murex is pretty mature however it is not considered a primitive. Which means, while it is a recommended builtin which you should expect in most deployments of murex, it’s still an optional package and thus may not be present in some edge cases. This is because it relies on external source packages for the shell to compile.
terraform {
required_version = "~> 0.11.5"
}
data "aws_availability_zones" "available" {}
data "aws_vpc" "vpc" {
id = "${var.vpc_id}"
}
data "aws_route53_zone" "external" {
zone_id = "${var.external_hosted_zone_id}"
}
data "aws_iam_policy_document" "assume_role_policy" {
statement {
actions = ["sts:AssumeRole"]
effect = "Allow"
principals {
identifiers = ["ec2.amazonaws.com"]
type = "Service"
}
}
}
See the HashiCorp’s documentation for HCL syntax.
hcl
tf
tfvars
application/hcl
application/x-hcl
text/hcl
text/x-hcl
Marshal()
Supported via a JSON marshaller because HCL is designed to be written by humans but “compiled” into JSONReadArray()
Works with HCL arrays. Maps are converted into arraysReadArrayWithType()
Works with HCL arrays. Maps are converted into arrays. Elements data-type in murex mirrors the HCL type of the elementReadIndex()
Works against all properties in HCLReadMap()
Works with HCL mapsReadNotIndex()
Works against all properties in HCLUnmarshal()
SupportedWriteArray()
Works with HCL arraysMarshal()
(type): Converts structured memory into a structured file format (eg for stdio)ReadArray()
(type): Read from a data type one array element at a timeReadIndex()
(type): Data type handler for the index, [
, builtinReadMap()
(type): Treat data type as a key/value structure and read its contentsReadNotIndex()
(type): Data type handler for the bang-prefixed index, ![
, builtinUnmarshal()
(type): Converts a structured file format into structured memoryWriteArray()
(type): Write a data type, one array element at a time[[
(element): Outputs an element from a nested structure[
(index): Outputs an element from an array, map or tablecast
: Alters the data type of the previous function without altering it’s outputformat
: Reformat one data-type into another data-typejson
: JavaScript Object Notation (JSON) (primitive)jsonl
: JSON Lines (primitive)open
: Open a file with a preferred handlerpretty
: Prettifies JSON to make it human readableruntime
: Returns runtime information on the internal state of murexyaml
: YAML Ain’t Markup Language (YAML)This site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Mon Feb 13 09:18:06 UTC 2023 against commit f339958f33995895c1d997efcdbb8408d2c8d45f8b5f934.
Current version is which has been verified against 13950 tests cases.