Skip to main content

Terraform Resources

This page provides a comprehensive reference for all resources available in the Kubiya Control Plane Terraform Provider.

Core Resources

controlplane_environment

Manages execution environments for agents and workers. Arguments:
  • name (Required, string) - Environment name
  • display_name (Optional, string) - Display name
  • description (Optional, string) - Environment description
  • tags (Optional, list(string)) - Tags for organization
  • configuration (Optional, JSON string) - Environment configuration
  • execution_environment (Optional, JSON string) - Execution settings
Example:

controlplane_project

Manages projects for organizing resources. Arguments:
  • name (Required, string) - Project name
  • key (Required, string) - Project key (uppercase abbreviation)
  • description (Optional, string) - Project description
  • goals (Optional, string) - Project goals
  • visibility (Optional, string) - Visibility setting (“private” or “public”)
  • metadata (Optional, JSON string) - Additional metadata
Example:

controlplane_team

Manages teams with shared configuration and capabilities. Arguments:
  • name (Required, string) - Team name
  • description (Optional, string) - Team description
  • runtime (Required, string) - Runtime type: “default” (Agno) or “claude_code” (Claude Code SDK)
  • configuration (Optional, JSON string) - Team configuration
  • capabilities (Optional, list(string)) - Team capabilities
Example:

controlplane_agent

Manages AI agents with custom LLM configurations. Arguments:
  • name (Required, string) - Agent name
  • description (Optional, string) - Agent description
  • model_id (Required, string) - LLM model (e.g., “kubiya/claude-sonnet-4”, “kubiya/gpt-4”)
  • runtime (Required, string) - Runtime: “default” or “claude_code”
  • team_id (Optional, string) - Team ID to assign agent
  • llm_config (Required, JSON string) - LLM configuration (temperature, max_tokens, etc.)
  • configuration (Optional, JSON string) - Agent-specific configuration
  • capabilities (Optional, list(string)) - Agent capabilities
Example:

Capability Resources

controlplane_skill

Manages skills for agent capabilities (filesystem, shell, docker, etc.). Arguments:
  • name (Required, string) - Skill name
  • description (Optional, string) - Skill description
  • type (Required, string) - Skill type: “shell”, “file_system”, “docker”, “custom”
  • enabled (Optional, bool) - Whether skill is enabled (default: true)
  • configuration (Optional, JSON string) - Skill-specific configuration
Examples: Shell Skill:
Filesystem Skill:
Docker Skill:

controlplane_policy

Manages OPA Rego policies for governance and security. Arguments:
  • name (Required, string) - Policy name
  • description (Optional, string) - Policy description
  • enabled (Optional, bool) - Whether policy is enabled (default: true)
  • policy_content (Required, string) - OPA Rego policy content
  • tags (Optional, list(string)) - Policy tags
Example:

controlplane_worker_queue

Manages worker queues for task execution within an environment. Arguments:
  • environment_id (Required, string) - Environment ID (cannot be changed after creation)
  • name (Required, string) - Queue name (lowercase, no spaces, 2-50 characters)
  • display_name (Optional, string) - Display name (default: "")
  • description (Optional, string) - Queue description (default: "")
  • status (Optional, string) - Queue status: “active”, “inactive”, or “paused” (default: “active”)
  • heartbeat_interval (Optional, number) - Heartbeat interval in seconds (10-300, default: 60)
  • max_workers (Optional, number) - Maximum workers (null = unlimited)
  • tags (Optional, list(string)) - Queue tags (default: [])
  • settings (Optional, map(string)) - Additional settings as key-value pairs (default: )
Computed Attributes:
  • id - Worker Queue ID
  • active_workers - Number of currently active workers
  • task_queue_name - Task queue name for Temporal
  • created_at - Creation timestamp
  • updated_at - Last update timestamp
Example:

controlplane_job

Manages scheduled, webhook-triggered, and manual jobs. Arguments:
  • name (Required, string) - Job name
  • description (Optional, string) - Job description
  • enabled (Optional, bool) - Whether job is enabled (default: true)
  • trigger_type (Required, string) - Trigger type: “cron”, “webhook”, or “manual”
  • cron_schedule (Optional, string) - Cron expression (required for cron triggers)
  • cron_timezone (Optional, string) - Timezone for cron (default: “UTC”)
  • planning_mode (Optional, string) - Planning mode: “predefined_agent”, “predefined_team”, “predefined_workflow”, or “on_the_fly” (default: “predefined_agent”)
  • entity_type (Optional, string) - Entity type: “agent”, “team”, or “workflow” (required when planning_mode is not “on_the_fly”)
  • entity_id (Optional, string) - Entity ID (agent_id, team_id, or workflow_id) (required when planning_mode is not “on_the_fly”)
  • prompt_template (Required, string) - Prompt template with variables
  • system_prompt (Optional, string) - System prompt for agent
  • executor_type (Optional, string) - Executor: “auto”, “specific_queue”, or “environment” (default: “auto”)
  • worker_queue_name (Optional, string) - Worker queue name (required for “specific_queue” executor)
  • environment_name (Optional, string) - Environment name (required for “environment” executor)
  • execution_env_vars (Optional, map(string)) - Environment variables
  • execution_secrets (Optional, list(string)) - Secret names
  • execution_integrations (Optional, list(string)) - Integration IDs to inject
  • config (Optional, JSON string) - Additional configuration
Examples: Cron Job:
Webhook Job:
Manual Job:
Job with Specific Queue:
Job with Integrations:
Job with On-the-Fly Planning:

Attributes Reference

All resources export the following attributes:
  • id - Unique identifier for the resource
  • created_at - Timestamp when resource was created
  • updated_at - Timestamp when resource was last updated

Job-Specific Attributes

Jobs also export:
  • webhook_url - Webhook URL (for webhook trigger type)
  • webhook_secret - Webhook HMAC secret for signature verification (sensitive)
  • status - Job status

Worker Queue-Specific Attributes

Worker queues also export:
  • environment_id - Environment ID
  • status - Queue status
  • active_workers - Number of active workers
  • task_queue_name - Task queue name for Temporal

Import

Resources can be imported using their ID:

Best Practices

Resource Naming

Use consistent, descriptive names:

Configuration as JSON

Use jsonencode() for configuration blocks:

Dependencies

Use explicit dependencies when needed:

Tags for Organization

Use tags consistently:

Next Steps