Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeDag
LibraryApp-spad
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
site_uuidstringYes—SpadSite.id to provision
slugstringYes—Site slug used to derive R2 bucket and Worker names
cloud_connection_uuidstringYes—Cloudflare CloudConnection.id
organization_uuidstringNo—Organization that owns the site

Output Schema ​

FieldTypeRequiredDefaultDescription
site_uuidstringYes—Site marked active
slugstringYes—Site slug propagated from input
cloud_connection_uuidstringYes—Cloudflare CloudConnection.id
r2_bucket_namestringYes—Created R2 bucket name (ltinteg-{slug})
r2_domainstringYes—Public R2 endpoint URL
worker_script_namestringYes—Deployed Worker script name (ltinteg-{slug})
worker_urlstringYes—Deployed Worker URL
deployed_atstringYes—ISO8601 timestamp when the Worker was deployed
statusstringYes—'active' once the workflow reaches COMPLETED
errorstringNo—Error snapshot recorded on the failure path
organization_uuidstringNo—Organization that owns the site
error_typestringNo—Engine-stamped failure metadata
failed_at_statejsonNo—Engine-stamped failure metadata
failed_layerjsonNo—Engine-stamped failure metadata
failed_stepjsonNo—Engine-stamped failure metadata
failure_reasonstringNo—Engine-stamped failure metadata
create_r2_bucketjsonNo—DAG step terminal state data
create_workerjsonNo—DAG step terminal state data
deploy_workerjsonNo—DAG step terminal state data
finalizejsonNo—DAG step terminal state data

DAG Layers ​

#LayerStepsCompensation
1create_r2_bucketspad.cloudflare.create_r2_bucketspad.cloudflare.compensate_delete_r2
2create_workerspad.cloudflare.create_workerspad.cloudflare.compensate_delete_worker
3deploy_workerspad.cloudflare.deploy_workerspad.compensation.noop
4finalizespad.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-workflowStep name
spad.cloudflare.create_r2_bucketcreate_r2_bucket
spad.cloudflare.create_workercreate_worker
spad.cloudflare.deploy_workerdeploy_worker
spad.cloudflare.site-creation-finalizefinalize
spad.cloudflare.compensate_delete_r2undo_create_r2
spad.cloudflare.compensate_delete_workerundo_create_worker
spad.compensation.noopack_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"
  }
}