spad.cloudflare.create_r2_bucket ​
Create Cloudflare R2 bucket for a SPAD site (DAG step)
Create an R2 bucket for the site; also records the infrastructure-start event.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | SpadSite.id whose R2 bucket should be created |
slug | string | Yes | — | Site slug used to derive the bucket name |
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
organization_uuid | string | No | — | Organization that owns the site |
workflow_run_id | string | No | — | — |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
r2_bucket_name | string | Yes | — | Name of the newly created R2 bucket (ltinteg-{slug}) |
r2_domain | string | Yes | — | Public R2 endpoint URL |
completed_at | string | No | — | ISO8601 timestamp when the step reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the step reached FAILED |
workflow_run_id | string | No | — | — |
site_uuid | string | No | — | SpadSite.id whose R2 bucket should be created |
slug | string | No | — | Site slug used to derive the bucket name |
cloud_connection_uuid | string | No | — | Cloudflare CloudConnection.id |
organization_uuid | string | No | — | Organization that owns the site |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
failure_reason | string | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | R2 creation step accepted |
run | No | No | — | complete | Creating R2 bucket |
completed | No | Yes | Yes | — | R2 bucket created |
failed | No | Yes | No | — | R2 bucket creation failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | Start R2 bucket creation |
run | complete | completed | Mark R2 bucket creation completed |
* (any state) | fail | failed | Mark R2 bucket creation failed |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.cloudflare.create_r2_bucket",
"initial_data": {
"site_uuid": "value",
"slug": "value",
"cloud_connection_uuid": "value"
}
}