Skip to main content
The Kosli provider allows you to manage Kosli resources as Infrastructure-as-Code using Terraform. Use it to define and manage custom attestation types and integrate Kosli into your compliance workflows. The provider is officially registered at the Terraform Registry.

Requirements

  • Terraform >= 1.8
  • A Kosli account with API credentials

Example usage

terraform {
  required_providers {
    kosli = {
      source = "kosli-dev/kosli"
    }
  }
}

# Configure the Kosli Provider
# Authentication via environment variables (recommended)
provider "kosli" {
  # API token - set via KOSLI_API_TOKEN environment variable
  # Organization name - set via KOSLI_ORG environment variable

  # Optional: API endpoint URL (defaults to https://app.kosli.com)
  # api_url = "https://app.us.kosli.com"  # Use US region

  # Optional: HTTP client timeout in seconds (defaults to 30)
  # timeout = 60
}

Authentication

The provider requires a Kosli API token and organization name for authentication. These can be configured in two ways (in order of precedence):
  1. Provider configuration - Set directly in your Terraform configuration
  2. Environment variables - Use KOSLI_API_TOKEN and KOSLI_ORG

Creating an API token

To create an API token:
  1. Log in to Kosli
  2. Navigate to SettingsAPI Tokens
  3. Click Create Token
  4. Copy the token and store it securely
API tokens grant full access to your Kosli organization. Store them securely and never commit them to version control.

Regional endpoints

Kosli operates in multiple regions. Configure the api_url to match your organization’s region:
  • EU (Default): https://app.kosli.com
  • US: https://app.us.kosli.com

Schema

Optional

  • api_token (String, Sensitive) Kosli API token for authentication. Can also be set via KOSLI_API_TOKEN environment variable.
  • api_url (String) Kosli API endpoint URL. Defaults to https://app.kosli.com (EU region). Use https://app.us.kosli.com for US region. Can also be set via KOSLI_API_URL environment variable.
  • org (String) Kosli organization name. Can also be set via KOSLI_ORG environment variable.
  • timeout (Number) HTTP client timeout in seconds. Defaults to 30 seconds.
Last modified on March 16, 2026