This module is intended to validate a JSON document against a JSON schema. This module
uses the http provider to issue a POST
request to a JSON Schema Validator HTTP API. If the status code of
the response is not 200 OK, then Terraform raises an error.
module "validate" {
source = "../.."
instance = jsonencode({
firstName = "John"
lastName = "Doe"
age = 21
})
schema = file("${path.module}/schema.json")
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
instance | A piece of JSON data which is to be described by a schema. | string |
n/a | yes |
schema | A document, written according to the proscribed structure of the JSON Schema specification, which can be used to describe instances. | string |
n/a | yes |
No outputs.