Manage Kestra Worker Groups with the Terraform Provider
For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append.mdto anykestra.io/docs/*URL for plain Markdown.
Terraform Resource: kestra_worker_group
Manages a Kestra Worker Group.
This resource is only available on the Enterprise Edition
Example usage
resource "kestra_worker_queue" "gpu" { queue_id = "gpu-queue" tags = ["gpu"]}
resource "kestra_worker_group" "example" { group_id = "gpu-workers" name = "GPU Workers" description = "Worker group dedicated to GPU workloads"
# Subscribe to the global default queue with no reservation subscriptions { worker_queue_id = "default" }
# Reserve 50% of each worker's slots for the GPU queue subscriptions { worker_queue_id = kestra_worker_queue.gpu.queue_id reserved_percent = 50 mode = "ELASTIC" }}Schema
Required
group_id(String) The worker group identifier (RFC 1123 label: lowercase alphanumerics and hyphens, must start and end with an alphanumeric, max 64 chars). Used in URLs and on the worker auth path; immutable.
Optional
description(String) The worker group description.name(String) The worker group display name. Defaults to thegroup_idwhen omitted.subscriptions(Block List) The Worker Queue subscriptions of the worker group. Subscriptions absent from the list are dropped on update; the underlying Worker Queue is preserved. (see below for nested schema)
Read-Only
id(String) The worker group id.
Nested Schema for subscriptions
Required:
worker_queue_id(String) The id of the Worker Queue to subscribe to. Use the reserveddefaultsentinel for the global default queue.
Optional:
mode(String) The reservation interaction mode:STRICT(default, reserved slots are exclusive) orELASTIC(idle reserved slots may be lent to other elastic subscriptions).reserved_percent(Number) The reserved percentage of each worker’s slots guaranteed to the Worker Queue:-1(no reservation, default) or a value in[1, 100]. The sum of reserved percentages across subscriptions must not exceed 100.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import kestra_worker_group.example {{group_id}}Was this page helpful?