8000 GitHub - teamon/hclq: HCL to JSON with jq passthrough · GitHub
[go: up one dir, main page]

Skip to content
teamonPublic

About

HCL to JSON with jq passthrough

Resources

Stars

19 stars

Watchers

2 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

hclq - HCL + JQ

Read HCL from stdin and pass to jq.

Build

make

Usage

Usage: hclq [jq options] < file.hcl

hclq - Convert HCL into JSON

# Example: Basic HCL to JSON conversion (no jq)
$ echo 'x { y = "z" }' | hclq
{"x":{"y":"z"}}

# Example: Pass JSON to jq
$ echo 'x { y = "z" }' | hclq '.'
{
  "x": {
    "y": "z"
  }
}

# Example: Pass query to jq
$ echo 'x { y = "z" }' | ./hclq '.x.y'
"z"

# Example: Pass query and options to jq
$ echo 'x { y = "z" }' | ./hclq -r '.x.y'
z

References

About

HCL to JSON with jq passthrough

Resources

Stars

19 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0