Skip to content
Proud to collaborate with Microsoft for Startups

spad.create_distribution ​

Create CloudFront distribution (DAG step)

Create CloudFront distribution (DAG step).

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-spad
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
site_uuidstringYes—SpadSite.id for context propagation
slugstringYes—Site slug used to derive distribution comment/origin
s3_bucket_namestringYes—Origin bucket name (set by create_bucket)
cloudfront_oac_refstringYes—CloudFront OAC ID (set by create_oac)
cloud_connection_uuidstringYes—AWS CloudConnection.id
organization_uuidstringNo—Organization that owns the site
s3_regionstringNo—Bucket region; inferred from connection when omitted

Output Schema ​

FieldTypeRequiredDefaultDescription
cloudfront_distribution_refstringYes—ID of the newly created CloudFront distribution
cloudfront_domainstringYes—Default *.cloudfront.net domain name for the distribution
resources_createdlistNo—Accumulator list of created resource tags (adds 'cloudfront_distribution')
completed_atstringNo—ISO8601 timestamp when the step reached COMPLETED
failed_atstringNo—ISO8601 timestamp when the step reached FAILED
site_uuidstringNo—SpadSite.id for context propagation
slugstringNo—Site slug used to derive distribution comment/origin
s3_bucket_namestringNo—Origin bucket name (set by create_bucket)
cloudfront_oac_refstringNo—CloudFront OAC ID (set by create_oac)
cloud_connection_uuidstringNo—AWS CloudConnection.id
organization_uuidstringNo—Organization that owns the site
s3_regionstringNo—Bucket region; inferred from connection when omitted
errorstringNo—Engine-stamped failure metadata
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

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—runStep accepted
runNoNo—completeExecuting site creation action
completedNoYesYes—Step completed successfully
failedNoYesNo—Step failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedrunrunStart step execution
runcompletecompletedMark step completed
* (any state)failfailedMark step failed

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "spad.create_distribution",
  "initial_data": {
    "site_uuid": "value",
    "slug": "value",
    "s3_bucket_name": "value",
    "cloudfront_oac_ref": "value"
  }
}