json2tfvars

command module
v0.0.0-...-387f944 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2019 License: MIT Imports: 8 Imported by: 0

README

json2tfvars

A simple CLI that parses arbritrary JSON to the HCL format of tfvars files.

Installation

go get github.com/imjoshholloway/json2tfvars

Usage

Pipe some json in:

echo '{ "string": "value", "object": { "key": { "subkey": "value" }, "key2": { "subkey2": "value" } }}' | json2tfvars

string = "value"
object = { key = { subkey = "value" }, key2 = { subkey2 = "value" } }

Alternatively pass in a json file:

json2tfvars -source=path/to/file.json

Why is this needed?

In versions of [terraform][#terraform] below the currently unreleased 0.12 nested maps in json variable files are not parsed correctly. This utility converts json payloads to the tfvars format in order to work around this issue.

See: https://github.com/hashicorp/terraform/issues/15549 for more information

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL