Provides a resource to manage a schema in API Shield Schema Validation 2.0.
resource "cloudflare_api_shield_schema" "petstore_schema" {
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "myschema"
kind = "openapi_v3" # optional
validation_enabled = true # optional, default false
source = file("./schemas/petstore.json")
}
name
(String) Name of the schema. Modifying this attribute will force creation of a new resource.source
(String) Schema file bytes. Modifying this attribute will force creation of a new resource.zone_id
(String) The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.kind
(String) Kind of schema. Defaults to openapi_v3
. Modifying this attribute will force creation of a new resource.validation_enabled
(Boolean) Flag whether schema is enabled for validation.id
(String) The ID of this resource.