https://github.com/duologic/soysonnet
Convert Terraform provider schemas into JSON schemas and generate Jsonnet libraries.
https://github.com/duologic/soysonnet
jsonnet jsonnet-lib jsonschema terraform
Last synced: 3 months ago
JSON representation
Convert Terraform provider schemas into JSON schemas and generate Jsonnet libraries.
- Host: GitHub
- URL: https://github.com/duologic/soysonnet
- Owner: Duologic
- License: gpl-3.0
- Created: 2025-02-18T19:53:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T21:39:26.000Z (about 1 year ago)
- Last Synced: 2025-03-17T22:46:25.281Z (about 1 year ago)
- Topics: jsonnet, jsonnet-lib, jsonschema, terraform
- Language: Jsonnet
- Homepage:
- Size: 2.58 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# soysonnet
Jsonnet libraries to generate libraries and resources for Hashicorp's Terraform.
## What is this?
- `soy-gen` can convert Terraform provider schemas into JSON schemas and generate Jsonnet libraries.
- `soy-common` provides common utility functions to work with the generated libraries.
## Why?
Because it is fun... :)
Jsonnet is my go-to tooling to configure applications in Kubernetes but I needed something to manage the more low level resources that come *before* Kubernetes. Terraform is the de facto standard in this space, thus I wrote this generator so I could use the same language (jsonnet) to configure all my CSP resources.
## How?
This tool builds upon [crdsonnet], which uses JSON schemas to generate Jsonnet code with [astsonnet]. However Terraform doesn't distribute [JSON Schemas] for the providers so I wrote a converter to aid in this. The converter builds upon docs and assumptions, so there may still be some mistakes there.
[crdsonnet]: https://github.com/crdsonnet/crdsonnet
[astsonnet]: https://github.com/crdsonnet/astsonnet
[JSON Schemas]: https://json-schema.org/