Home

Awesome

terraform-json

GoDoc

This repository houses data types designed to help parse the data produced by two Terraform commands:

While containing mostly data types, there are also a few helpers to assist with working with the data.

This repository also serves as de facto documentation for the formats produced by these commands. For more details, see the GoDoc.

Should I use this library?

This library was built for a few specific applications, and is not intended for general purpose use.

The Terraform core team recommends against using terraform-json if your application has any of the following requirements:

When is terraform-json suitable? We recommend using it for applications which decode the core stable data types and use it directly, and don't attempt to emit JSON to be consumed by applications which expect the Terraform format.

Why a separate repository?

To reduce dependencies on any of Terraform core's internals, we've made a design decision to make any helpers or libraries that work with the external JSON data external and not a part of the Terraform GitHub repository itself.

While Terraform core will change often and be relatively unstable, this library will see a smaller amount of change. Most of the major changes have already happened leading up to 0.12, so you can expect this library to only see minor incremental changes going forward.

For this reason, terraform show -json and terraform providers schema -json is the recommended format for working with Terraform data externally, and as such, if you require any help working with the data in these formats, or even a reference of how the JSON is formatted, use this repository.