spad.domain-configuration ​
Configures a custom domain with SSL certificate and DNS
Configures a custom domain with SSL certificate and CloudFront/DNS.
Input fields: domain_id, site_id, organization_id, domain_name, dns_connection_id, dns_zone_id, dns_zone_name
WAITING_FOR_VALIDATION has no auto_advance — external caller must call check_validation until the certificate is issued, then call configure_cloudfront to advance the workflow.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
domain_uuid | string | Yes | — | SpadDomain.id to configure |
site_uuid | string | Yes | — | SpadSite.id the domain belongs to |
domain_name | string | Yes | — | The custom domain name (e.g. www.example.com) |
organization_uuid | string | No | — | Organization that owns the site |
dns_connection_uuid | string | No | — | CloudConnection.id for the DNS provider |
dns_zone_ref | integer | No | — | DnsZone.id; required when DNS auto-provisioning is desired |
dns_zone_name | string | No | — | DNS zone name (apex domain) — used when zone_id is omitted |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
domain_uuid | string | Yes | — | SpadDomain.id that was configured |
site_uuid | string | Yes | — | Site the domain belongs to |
organization_uuid | string | No | — | Organization that owns the site |
domain_name | string | Yes | — | The custom domain name |
dns_connection_uuid | string | No | — | CloudConnection.id for the DNS provider |
dns_zone_ref | integer | No | — | DnsZone.id when DNS auto-provisioning is used |
dns_zone_name | string | No | — | DNS zone name propagated from input |
cloudfront_distribution_ref | string | No | — | CloudFront distribution id the domain was attached to |
cloudfront_domain | string | No | — | CloudFront default domain for the site |
cloud_connection_uuid | string | No | — | AWS CloudConnection.id used for ACM/CloudFront |
certificate_arn | string | Yes | — | ACM certificate ARN requested for the domain |
certificate_status | string | No | — | ACM certificate status observed on the last poll |
certificate_validated | boolean | No | — | True once the certificate reached ISSUED |
validation_records | list | No | — | ACM CNAME validation records created in DNS |
validation_check_count | integer | No | — | Number of ACM validation polls executed |
cloudfront_configured | boolean | No | — | True once the domain was attached to the CloudFront distribution |
dns_record_ref | string | No | — | DNS record id created pointing the domain at CloudFront |
initiated_at | string | Yes | — | ISO8601 timestamp when the workflow was initiated |
initiated_by | string | No | — | Actor id that initiated the workflow |
certificate_requested_at | string | No | — | ISO8601 timestamp when the certificate was requested |
validation_records_created_at | string | No | — | ISO8601 timestamp when validation records were created |
validation_started_at | string | No | — | ISO8601 timestamp when validation polling started |
last_check_at | string | No | — | ISO8601 timestamp of the most recent validation poll |
validated_at | string | No | — | ISO8601 timestamp when the cert reached ISSUED |
cloudfront_configured_at | string | No | — | ISO8601 timestamp when CloudFront was reconfigured |
dns_record_created_at | string | No | — | ISO8601 timestamp when the DNS record was created |
completed_at | string | No | — | ISO8601 timestamp when the workflow reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the workflow reached FAILED |
failure_reason | string | No | — | Reason recorded on the failure path |
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 |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | request_certificate | — |
configuring_cloudfront | No | No | — | create_dns_record | — |
creating_dns_record | No | No | — | complete | — |
creating_validation_records | No | No | — | wait_for_validation | — |
requesting_certificate | No | No | — | create_validation_records | — |
waiting_for_validation | No | No | — | — | Poll ACM validation status via scheduled transitions |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | request_certificate | requesting_certificate | — |
requesting_certificate | create_validation_records | creating_validation_records | — |
creating_validation_records | wait_for_validation | waiting_for_validation | — |
waiting_for_validation | check_validation | waiting_for_validation | — |
waiting_for_validation | configure_cloudfront | configuring_cloudfront | — |
configuring_cloudfront | create_dns_record | creating_dns_record | — |
creating_dns_record | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.domain-configuration",
"initial_data": {
"domain_uuid": "value",
"site_uuid": "value",
"domain_name": "value"
}
}