spad.site-creation-cloudflare ​
Provisions Cloudflare infrastructure for a new SPAD site (DAG)
DAG-based site creation for Cloudflare-backed SPAD sites.
Leaf workflow types are spad.cloudflare.* — see site_creation_cloudflare_dag/steps/.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | SpadSite.id to provision |
slug | string | Yes | — | Site slug used to derive R2 bucket and Worker names |
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
organization_uuid | string | No | — | Organization that owns the site |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | Site marked active |
slug | string | Yes | — | Site slug propagated from input |
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | Yes | — | Created R2 bucket name (ltinteg-{slug}) |
r2_domain | string | Yes | — | Public R2 endpoint URL |
worker_script_name | string | Yes | — | Deployed Worker script name (ltinteg-{slug}) |
worker_url | string | Yes | — | Deployed Worker URL |
deployed_at | string | Yes | — | ISO8601 timestamp when the Worker was deployed |
status | string | Yes | — | 'active' once the workflow reaches COMPLETED |
error | string | No | — | Error snapshot recorded on the failure path |
organization_uuid | string | No | — | Organization that owns the site |
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 |
create_r2_bucket | json | No | — | DAG step terminal state data |
create_worker | json | No | — | DAG step terminal state data |
deploy_worker | json | No | — | DAG step terminal state data |
finalize | json | No | — | DAG step terminal state data |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | create_r2_bucket | spad.cloudflare.create_r2_bucket | spad.cloudflare.compensate_delete_r2 |
| 2 | create_worker | spad.cloudflare.create_worker | spad.cloudflare.compensate_delete_worker |
| 3 | deploy_worker | spad.cloudflare.deploy_worker | spad.compensation.noop |
| 4 | finalize | spad.cloudflare.site-creation-finalize | — |
Execution Flow ​
Compensation ​
When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
spad.cloudflare.create_r2_bucket | create_r2_bucket |
spad.cloudflare.create_worker | create_worker |
spad.cloudflare.deploy_worker | deploy_worker |
spad.cloudflare.site-creation-finalize | finalize |
spad.cloudflare.compensate_delete_r2 | undo_create_r2 |
spad.cloudflare.compensate_delete_worker | undo_create_worker |
spad.compensation.noop | ack_no_compensation_deploy_worker |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.site-creation-cloudflare",
"initial_data": {
"site_uuid": "value",
"slug": "value",
"cloud_connection_uuid": "value"
}
}