abiosoft / hcl2json

HCL to JSON converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hcl2json

Go

Fork of https://github.com/tmccombs/hcl2json that simply splits the project into library and cmd.

This is a tool to convert from HCL to json, to make it easier for non-go applications and scripts to process HCL inputs (such as terraform config).

It converts the provide native HCL file to an (almost) equivalent HCL JSON file. Note, however, that there are some corner cases where it may not be exactly equivalent, especially if the target application makes use of static analysis.

Install

go get github.com/abiosoft/hcl2json/cmd/hcl2json@master

Usage

Usage: 
  -indent int
        number of spaces to indent with (default 2)
  -input string
        input HCL file. If missing, reads from stdin
  -output string
        output JSON file. If missing, writes to stdout

About

HCL to JSON converter

License:Apache License 2.0


Languages

Language:Go 96.5%Language:Dockerfile 3.5%