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
I am uncertain if configuration/template language, such as Terraform, should include scripting. It is beneficial to have a simple configuration, albeit redundant, for VCS tracking and simple diff for merge reviews.
I would advocate a high level langauge (HLL), like Python, be used to produce the Terraform configuration with both HLL and Terraform be included in the repository. HLL is familiar, and the Terraform changes are easy to review.
Using an HLL for Terraform generation removes the need for the quirky template expressions, complex expressions, and modules.
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
- Existing parser for HCL1
- Existing parser for HCL2
- Unicode Identifiers - UAX31
- Terraform Spec
- [Diagram terraform](https://diagrams.mingrammer.com/docs/getting-started/installation
- Graphviz
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
Built Distribution
Hashes for terraform-parser-0.580.24088.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd11813d95e7d6946e727cfa16f4f27549b36f599b0d308897360e4b1f67b3f |
|
MD5 | 7560ede2447a515f3e045073394482e3 |
|
BLAKE2b-256 | add0cd19120d0e05b0a74ab2e0fc60870c5b068cb293095e64216461906243dd |
Hashes for terraform_parser-0.580.24088-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afb21528486a29bf92f705fc61be86c440cba5012d1ce661b281f32cddf5f404 |
|
MD5 | ffb05b0c3ed3d3abd8b2766d8081f891 |
|
BLAKE2b-256 | 4f1da19700952bc08cfff0805515d8a4953201cd2b2d27cfe5d11f8b0facff56 |