Categorygithub.com/rescDev/hclconv
modulepackage
0.3.0
Repository: https://github.com/rescdev/hclconv.git
Documentation: pkg.go.dev

# README

hclconv

Simple tool to convert JSON files to HCL2 files and vice versa. It was intended for personal use and therefore its implementation might have a few flaws (I'm not a Go expert, but I have been using it for a while and I really like it).

Installation

Download the binary fitting your platform from the releases page.

Usage

Convert HCL file to JSON

hclconv --in sample.tfvars --out sample.tfvars.json

Convert JSON file to HCL

hclconv --in sample.tfvars.json --out sample.tfvars

Convert JSON file to HCL and format its content

NOTE: This requires the terraform CLI tool to be installed as the format is done by running terraform fmt <output-file>.

hclconv --format --in sample.tfvars.json --out sample.tfvars

Contributing

Contributions are very welcome ! As written initially, there might be a few things that can be improved. So if you stumble across this project and want to add things or improve the implementation, feel free to propose your changes :)

Maintainers

Rene Schach - @relusc