This page covers managing custom attestation types via Terraform. For an introduction to custom attestation types and creating them via the CLI, see Getting started: Attestations.
- A JSON Schema (optional) that defines the expected structure of attestation data
- jq rules (optional) that evaluate the data to determine compliance
- A summary (optional) — ordered, labeled jq expressions that Kosli renders as rows on the attestation detail page
Create a custom attestation type
With schema and jq rules
With jq rules only
With schema only
With a summary
summary takes a JSON array of {name, expression} objects. Each expression is a jq expression
evaluated against the attestation data when the attestation is displayed, and the entries render in
the order given. A string value beginning with http:// or https:// renders as a clickable link.
file() instead of jsonencode() to keep the summary in a standalone JSON file, so the same
definition can be shared with other tooling:
The summary is part of the versioned type definition, so changing it creates a new version of the
attestation type — exactly like changing the schema or the jq rules. Removing
summary from a type
that had one clears the summary on the new version, so attestations reported against it fall back to
showing the jq evaluation results as a pass/fail checklist. Attestations reported against an earlier
version keep the summary that version defined.Import an existing custom attestation type
If you have custom attestation types created via the CLI, you can bring them under Terraform management by importing them into your .- Find the attestation type name in the Kosli UI or run:
-
Add a matching
kosli_custom_attestation_typeresource block to your configuration. - Run the import:
- Verify with
terraform plan— no changes should be planned if the import succeeded.