A Terraform provider for validating json files using json-schema.
On Terraform versions 0.13+ use:
terraform {
required_providers {
jsonschema = {
source = "bpedman/jsonschema"
version = "0.2.1"
}
}
}For Terraform versions 0.12 or lower use instructions: install a terraform plugin
See User Documentation for details.
Example:
#: Validate values file
data "jsonschema_validator" "values" {
document = file("/path/to/document.json")
schema = "/path/to/schema.json"
}
#: Install a helm release with the validated json
resource "helm_release" "service_overview" {
values = [
data.jsonschema_validator.values.validated,
]
}
This repository follows structure of terraform-provider-scaffolding template recommended by Terraform developers (see Publishing Providers).
For publishing it uses GitHub Actions. Push a new tag and a new version is built and released.
Environment requirements:
- Go 1.15 (to build the provider plugin)
Running tests:
make testacc