---
title: Workflows
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/terraform)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Workflows

#### resource cloudflare\_workflow

##### required Expand Collapse

account\_id: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20account_id>)

workflow\_name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20workflow_name>)

class\_name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20class_name>)

script\_name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20script_name>)

##### optional Expand Collapse

<details>

<summary>

concurrency?: Attributes

</summary>

limit?: Int64

Maximum number of instances of this workflow that can run concurrently. Additional instances are queued and started as running instances complete. Must not exceed the account concurrency limit.

<a href="#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20concurrency%20%3E%20(attribute)%20limit">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20concurrency>)

<details>

<summary>

default\_retention?: Attributes

Default retention applied to instances of this version when they do not set their own retention.

</summary>

error\_retention?: Dynamic Int64 | String

Specifies the duration in milliseconds or as a string like ‘5 minutes’.

<a href="#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20default_retention%20%3E%20(attribute)%20error_retention">Link to this property</a>

success\_retention?: Dynamic Int64 | String

Specifies the duration in milliseconds or as a string like ‘5 minutes’.

<a href="#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20default_retention%20%3E%20(attribute)%20success_retention">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20default_retention>)

<details>

<summary>

limits?: Attributes

</summary>

steps?: Int64

<a href="#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20limits%20%3E%20(attribute)%20steps">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20limits>)

<details>

<summary>

schedules?: List\[Attributes]

</summary>

cron: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20schedules%20%3E%20(attribute)%20cron">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20schedules>)

##### computed Expand Collapse

id: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20id>)

name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20name>)

created\_on: Time

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20created_on>)

is\_deleted: Float64

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20is_deleted>)

modified\_on: Time

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20modified_on>)

script\_deleted: Bool

Whether the bound Worker was deleted, leaving this Workflow inactive.

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20script_deleted>)

terminator\_running: Float64

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20terminator_running>)

triggered\_on: Time

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20triggered_on>)

version\_id: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20version_id>)

instances: Map\[Float64]

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20instances>)

### cloudflare\_workflow

Terraform

HTTPTypeScriptPythonGoTerraform

```
resource "cloudflare_workflow" "example_workflow" {
  account_id = "account_id"
  workflow_name = "x"
  class_name = "x"
  script_name = "x"
  concurrency = {
    limit = 1
  }
  default_retention = {
    error_retention = "5 minutes"
    success_retention = "5 minutes"
  }
  limits = {
    steps = 1
  }
  schedules = [{
    cron = "x"
  }]
}
```

#### data cloudflare\_workflow

##### required Expand Collapse

account\_id: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20account_id>)

##### optional Expand Collapse

workflow\_name?: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20workflow_name>)

<details>

<summary>

filter?: Attributes

</summary>

search?: String

Allows filtering workflows\` name.

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter%20%3E%20(attribute)%20search">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter>)

##### computed Expand Collapse

id: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

class\_name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20class_name>)

created\_on: Time

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20created_on>)

modified\_on: Time

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20modified_on>)

name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20name>)

script\_deleted: Bool

Whether the bound Worker was deleted, leaving this Workflow inactive.

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20script_deleted>)

script\_name: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20script_name>)

triggered\_on: Time

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20triggered_on>)

instances: Map\[Float64]

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20instances>)

<details>

<summary>

schedules: List\[Attributes]

</summary>

cron: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20schedules%20%3E%20(attribute)%20cron">Link to this property</a>

next\_instance: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20schedules%20%3E%20(attribute)%20next_instance">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20schedules>)

### cloudflare\_workflow

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_workflow" "example_workflow" {
  account_id = "account_id"
  workflow_name = "x"
}
```

#### data cloudflare\_workflows

##### required Expand Collapse

account\_id: String

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20account_id>)

##### optional Expand Collapse

search?: String

Allows filtering workflows\` name.

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20search>)

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

class\_name: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20class_name">Link to this property</a>

created\_on: Time

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20created_on">Link to this property</a>

instances: Map\[Float64]

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20instances">Link to this property</a>

modified\_on: Time

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20modified_on">Link to this property</a>

name: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20name">Link to this property</a>

script\_name: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20script_name">Link to this property</a>

triggered\_on: Time

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20triggered_on">Link to this property</a>

<details>

<summary>

schedules: List\[Attributes]

</summary>

cron: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20schedules%20%3E%20(attribute)%20cron">Link to this property</a>

next\_instance: String

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20schedules%20%3E%20(attribute)%20next_instance">Link to this property</a>

</details>

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20schedules">Link to this property</a>

script\_deleted: Bool

Whether the bound Worker was deleted, leaving this Workflow inactive.

<a href="#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20script_deleted">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workflows%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_workflows

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_workflows" "example_workflows" {
  account_id = "account_id"
  search = "x"
}
```