Kubiya Terraform Provider
The Kubiya Terraform provider enables Infrastructure as Code (IaC) management of your Kubiya AI platform resources. Define, version, and deploy agents, workflows, integrations, and more through declarative Terraform configurations.The Kubiya provider is officially supported and maintained by Kubiya. For support, visit support.kubiya.ai.
Why Use the Terraform Provider?
Infrastructure as Code
Version control your AI agents and workflows alongside your infrastructure
Reproducible Deployments
Deploy consistent configurations across environments
GitOps Ready
Integrate with your existing CI/CD pipelines
Drift Detection
Automatically detect and correct configuration drift
Quick Start
1
Install Provider
Add the provider to your Terraform configuration:
2
Set Authentication
Export your API key as an environment variable:
Generate an API key from the Kubiya dashboard under Admin → Kubiya API Keys.
3
Create Resources
Define your first agent:
4
Deploy
Initialize and apply your configuration:
Authentication
The Kubiya provider supports authentication via environment variable for security best practices.KUBIYA_API_KEY
:Never commit API keys to version control. Always use environment variables or secret management systems.
Available Resources
The Kubiya provider offers comprehensive resource management:Core Resources
Agents
Agents
kubiya_agent - AI agents that can execute tasks and workflows
- Define agent behaviors and capabilities
- Configure access controls and permissions
- Set up integrations and tools
Workflows
Workflows
kubiya_source - Workflow and tool definitions
- Define reusable workflow templates
- Create custom tool integrations
- Version control your automation logic
Integrations
Integrations
kubiya_integration - Third-party service connections
- Connect to external APIs and services
- Configure OAuth and API key authentication
- Manage integration lifecycles
Automation Resources
Webhooks
Webhooks
kubiya_webhook - Event-driven automation endpoints
- Receive events from external systems
- Trigger workflows automatically
- Process incoming data
Triggers
Triggers
kubiya_trigger - HTTP endpoints for workflow execution
- Create custom API endpoints
- Handle HTTP requests
- Return structured responses
Scheduled Tasks
Scheduled Tasks
kubiya_scheduled_task - Cron-based automation
- Schedule recurring tasks
- Define time-based workflows
- Automate maintenance operations
Infrastructure Resources
Runners
Runners
kubiya_runner - Execution environments for agents
- Configure compute resources
- Set up isolated environments
- Manage runner pools
Secrets
Secrets
kubiya_secret - Secure credential storage
- Store API keys and tokens
- Manage sensitive configuration
- Control access permissions
Knowledge Bases
Knowledge Bases
kubiya_knowledge - AI knowledge repositories
- Configure knowledge sources
- Set up vector databases
- Manage context for agents
Best Practices
Example Configurations
Migration Guide
If you’re migrating from manual configuration to Terraform:1
Import Existing Resources
2
Generate Configuration
Use
terraform show
to view imported resource configuration3
Refine and Apply
Adjust the configuration and apply changes incrementally
Troubleshooting
Authentication Errors
Authentication Errors
Ensure your API key is correctly set:Verify the key has appropriate permissions in the Kubiya dashboard.
Resource Not Found
Resource Not Found
Check that resource names are unique within your organization and follow naming conventions.
Rate Limiting
Rate Limiting
The Kubiya API has rate limits. Use
-parallelism=1
for large deployments:Next Steps
Getting Started Guide
Step-by-step tutorial for your first deployment
Example Configurations
Production-ready configuration examples
Resource Reference
Detailed documentation for all resources
Best Practices
Advanced patterns and recommendations
Support
Need Help?
- Documentation: docs.kubiya.ai
- Support: support.kubiya.ai
- Community: community.kubiya.ai
- GitHub: github.com/kubiya-terraform/terraform-provider-kubiya