Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alisdair/tfvars-json

Reads Terraform .tfvars files and outputs JSON
https://github.com/alisdair/tfvars-json

Last synced: 10 days ago
JSON representation

Reads Terraform .tfvars files and outputs JSON

Awesome Lists containing this project

README

        

# tfvars-json

`tfvars-json` reads [Terraform](https://github.com/hashicorp/terraform) [`.tfvars` variable definition files](https://www.terraform.io/docs/language/values/variables.html#variable-definitions-tfvars-files) and outputs the same values in Terraform JSON syntax.

## Usage

```shellsession
$ tfvars-json file.tfvars > file.tfvars.json
```

`tfvars-json` processes a single file and outputs to stdout. You can use a JSON scripting tool like [`jq`](https://stedolan.github.io/jq/) to filter or post-process this output.

## Installation

```shellsession
$ go install github.com/alisdair/tfvars-json@latest
```