Skip to content

vladarts/terraform-provider-jsonschema

Repository files navigation

terraform-provider-jsonschema

A Terraform provider for validating json files using json-schema.

On Terraform versions 0.13+ use:

terraform {
  required_providers {
    jsonschema = {
      source = "xxxbobrxxx/jsonschema"
      version = "0.1.0"
    }
  }
}

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 = file("/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 Gitlab Actions.

Environment requirements:

  • Go 1.15 (to build the provider plugin)

Running tests:

make testacc

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published