Terraform Provider
ChatBotKit's Terraform provider brings infrastructure-as-code to your conversational AI stack. Define bots, datasets, skillsets, secrets, and integrations in declarative HCL, and manage everything through standard Terraform workflows. Every change is version-controlled, reviewable, and reproducible.
Whether you need consistent multi-environment deployments, pull-request-based reviews for agent changes, or instant rollback when something goes wrong, the Terraform provider treats your AI agent fleet as first-class infrastructure.
Key Features
- Declarative Resource Management: Define bots, datasets, skillsets, secrets, and integrations as HCL resources.
- Plan and Apply: Preview every change before it goes live with
terraform plan. - Multi-Environment Support: Use workspaces and variable overrides to manage dev, staging, and production consistently.
- Import Existing Resources: Bring manually created bots and datasets under Terraform management.
- Drift Detection: Detect and correct manual changes that bypass your Terraform workflow.
- Full Lifecycle Control: Create, update, destroy, and recreate your entire agent stack with a single command.
Getting Started
Add the provider to your configuration and run terraform init:
terraform {
required_providers {
chatbotkit = {
source = "chatbotkit/chatbotkit"
version = "~> 1.0"
}
}
}
provider "chatbotkit" {
api_secret = var.chatbotkit_api_secret
}
resource "chatbotkit_bot" "support_agent" {
name = "Customer Support Agent"
model = "claude-4.6-sonnet"
backstory = "You are a helpful customer support agent for Acme Corp."
}
Then preview and apply your changes:
terraform plan
terraform apply
Browse the Terraform Provider documentation for the full resource reference and explore Tutorials for step-by-step guides.