Terraform v1.0.0

Terraform Provider SDK

Official Terraform Provider SDK for Traffic Orchestrator. Validate licenses, manage keys, and integrate license management into your infrastructure in minutes.

terraform init

Quick Start

Initialize the client and start validating licenses.

hcl
provider "trafficorchestrator" {
  api_key  = var.to_api_key
  base_url = "https://api.trafficorchestrator.com/api/v1"
}

License Validation

Validate a license key against a domain with a single call.

hcl
# Create a license via Terraform
resource "trafficorchestrator_license" "app" {
  product = "my-app"
  plan    = "pro"
  domains = ["example.com", "*.example.com"]
}

output "license_key" {
  value = trafficorchestrator_license.app.key
}

Offline Verification

Verify licenses offline using Ed25519 cryptographic signatures — no network required.

hcl
# Data source to read existing licenses
data "trafficorchestrator_license" "existing" {
  key = "TO-XXXX-XXXX-XXXX"
}

Management API

Create licenses, list existing keys, and monitor usage with authenticated API calls.

hcl
# Manage products via IaC
resource "trafficorchestrator_product" "saas" {
  name        = "My SaaS App"
  description = "License management for My SaaS"
  plans       = ["free", "starter", "pro", "enterprise"]
}

Available Methods

validateLicense()
Validate a license key against a domain
verifyOffline()
Cryptographic offline verification (Ed25519)
listLicenses()
List all licenses (requires API key)
createLicense()
Create a new license key (requires API key)
getUsage()
Retrieve usage statistics (requires API key)
healthCheck()
Check API health and connectivity
gracePeriod
Cache validation results for resilience during API outages (v2.1.0+)
clearCache()
Clear cached validation results immediately