Skip to main content
Use the Coval Terraform provider to manage test configuration in version control. The provider repository contains the source and resource examples.

Install

Requires Terraform 1.12 or newer. Add the provider to your configuration:
Configure authentication with the api_key argument or COVAL_API_KEY environment variable. The provider uses https://api.coval.dev/v1 by default; api_base_url selects another API root.

Create a test set

This example creates a test set with one scenario. Its workspace_id variable selects the workspace that owns these resources.
Initialize the provider, review the plan, and apply it:
Commit .terraform.lock.hcl with your configuration. Keep state and saved plans in access-controlled storage.

Use it with the Agent SDK

The test_set_id output contains the created test set’s ID:
Pass that value as RunConfig.test_set_id in an Agent SDK run, with an SDK WebSocket agent and voice persona from the same workspace. Terraform manages the test configuration; the SDK runs your voice pipeline. Use the returned run ID to review recordings, transcripts, evaluations, and traces in Coval. Keep changes to Terraform-managed configuration in code. Editing those fields in the platform creates drift that a later apply may overwrite.

Reference