Installing the provider
Add the Toktra provider to your Terraform configuration’srequired_providers block:
versions.tf
terraform init to download the provider:
Authentication
Configure the provider with your Toktra API URL and API key:provider.tf
TOKTRA_API_URL and TOKTRA_API_KEY automatically:
Environment variables
Resources
toktra_policy
Manages a Toktra usage policy. Policies define conditions that trigger alerts or blocks.
policy.tf
toktra_budget
Manages a monthly spending budget for your organization.
budget.tf
toktra_alert_config
Manages notification routing for Toktra alerts.
alert_config.tf
toktra_siem_config
Manages a SIEM connector (Splunk, Datadog, or Elasticsearch).
siem.tf
toktra_itsm_config
Manages an ITSM connector (ServiceNow or Jira).
itsm.tf
toktra_sso_config
Manages SSO/SAML configuration for your organization.
sso.tf
Complete example
The following configuration manages a full Toktra deployment:main.tf
Importing existing resources
If you have existing Toktra resources created through the dashboard, import them into Terraform state usingterraform import:
Import examples
GET /v1/api/siem/configs, etc.).
After importing, run terraform plan to verify the imported state matches your configuration. Adjust any attribute values that differ before running terraform apply.