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.325.22362.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ffaf96821964677c59477c47fd1e19173313e38ddf6ba3dc69c4460010c1aca |
|
MD5 | 7e5a22f397c5b9e537768ffef1601097 |
|
BLAKE2b-256 | b817fa92693628cf49ff059c12e7daef9f66c90ade653972902770ba8f022edb |