For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append .md to any kestra.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 = <<EOT
id: my-flow
namespace: company.team
inputs:
- id: my-value
type: STRING
variables:
first: "1"
tasks:
- id: t2
type: io.kestra.plugin.core.log.Log
message: first {{task.id}}
level: TRACE
EOT
}
resource "kestra_flow" "with_metadata" {
namespace = "company.team"
flow_id = "my-other-flow"
description = "Managed from Terraform"
disabled = false
labels = {
team = "data"
}
content = <<EOT
id: my-other-flow
namespace: company.team
tasks:
- id: hello
type: io.kestra.plugin.core.log.Log
message: hello
EOT
}

Schema

Required

  • content (String) The flow full content in yaml string.

Optional

  • description (String) The flow description. Leave description out of content when set.
  • disabled (Boolean) Whether the flow is disabled. Leave disabled out of content when set.
  • flow_id (String) The flow id. Defaults to the id in content, which it must match. When content leaves id out, it is added from this attribute. Set it when content can be unknown during planning, or an update of the flow plans a replacement.
  • labels (Map of String) The flow labels. Leave labels out of content when set.
  • namespace (String) The flow namespace. Defaults to the namespace in content, which it must match. When content leaves namespace out, it is added from this attribute. Set it when content can 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?