Manage Kestra Flows 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_flow
Manages a Kestra Flow.
The flow description, disabled and labels can be written in content or set as attributes, but not both. An attribute is merged into the source sent to Kestra and left out of content when read back.
Example usage
resource "kestra_flow" "example" { namespace = "company.team" flow_id = "my-flow" content = <<EOTid: my-flownamespace: company.teaminputs: - id: my-value type: STRING
variables: first: "1"
tasks: - id: t2 type: io.kestra.plugin.core.log.Log message: first {{task.id}} level: TRACEEOT}
resource "kestra_flow" "with_metadata" { namespace = "company.team" flow_id = "my-other-flow" description = "Managed from Terraform" disabled = false labels = { team = "data" } content = <<EOTid: my-other-flownamespace: company.teamtasks: - id: hello type: io.kestra.plugin.core.log.Log message: helloEOT}Schema
Required
content(String) The flow full content in yaml string.
Optional
description(String) The flow description. Leavedescriptionout ofcontentwhen set.disabled(Boolean) Whether the flow is disabled. Leavedisabledout ofcontentwhen set.flow_id(String) The flow id. Defaults to theidincontent, which it must match. Whencontentleavesidout, it is added from this attribute. Set it whencontentcan be unknown during planning, or an update of the flow plans a replacement.labels(Map of String) The flow labels. Leavelabelsout ofcontentwhen set.namespace(String) The flow namespace. Defaults to thenamespaceincontent, which it must match. Whencontentleavesnamespaceout, it is added from this attribute. Set it whencontentcan be unknown during planning, or an update of the flow plans a replacement.
Read-Only
id(String) The flow resource id,namespace/flow_id.revision(Number) The flow revision.tenant_id(String) The tenant id.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import kestra_flow.example {{namespace}}/{{flow_id}}Was this page helpful?