Terraform Parser - Parse Terraform to JSON
Project description
terraform-parser
Parse Terraform scripts into JSON
Status
Dec 2022 - This an experimental parser that can parse HCL2
Problem
Terraform scripting can be complex;
An application (or docker image, or lambda) is a black box to infrastructure: Services defined in infrastructure are communicated to the application as a set of environment variables.
We want to define services independently, in terraform, and then merge many services into a single infrastructure specification. Specifically, we want to
- avoiding terraform namespace collision
- merge the vars and other resources
- merge the application environment variables
Solution
Most of the solution is to use terraform modules. The remaining problem is
The hope is to
- parse terraform into Json data
- merge data from different terraform to single spec
- allow Python to modify data easily
- write out terraform (in diff-friendly way)
References
- Look at what is done here - https://github.com/starhawking/python-terrascript
- Parser for HCL1
- parser for HCL2
- Unicode Identifiers - UAX31
- Terraform Spec
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for terraform-parser-0.326.22362.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e3e20a7003a34bc671e639160af8b9a1b87cdd00b8d6c377fad5adfd1ff8c6 |
|
MD5 | 81a1f39ec52c13d3856eed5ecb222686 |
|
BLAKE2b-256 | f74c04115bb82bcb94434e00e3e70b18ec949eaa624a8dbc84c44449e3775742 |