deploy.platform.teardown ​
Reverse of deploy.platform.release: best-effort teardown of domains, static sites, services (+images), and databases.
Tear down a full platform release (reverse order, best-effort, idempotent).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-deployments |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID. |
deployment_plan_id | string | No | — | External plan or change id. |
environment | string | No | — | Environment being torn down. |
gcp_connection_uuid | uuid | Yes | — | GCP connection UUID. |
registry_config | json | No | — | Artifact Registry / project-region defaults (project_id, region, repository_id). |
services | list | No | — | Services to tear down (service_name, deployment_target_uuid, image_name, repository_id, domain, delete_image). |
databases | list | No | — | Databases to deprovision (instance_id, secret_id, connection_uuid, region). |
static_sites | list | No | — | Static sites to tear down (bucket, prefix, dns_zone_id, dns_record_id). |
domains | list | No | — | Domains to unbind (domain, region, dns_zone_id, dns_record_id). |
delete_images | boolean | No | — | When true, also delete each service image from Artifact Registry. Default false. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Echoed organization UUID. |
deployment_plan_id | string | No | — | External plan id. |
environment | string | No | — | Environment. |
domain_results | list | No | — | Per-domain unbind outcomes. |
static_results | list | No | — | Per-static-site teardown outcomes. |
service_results | list | No | — | Per-service Cloud Run teardown outcomes. |
image_results | list | No | — | Per-image delete outcomes (when delete_images). |
database_results | list | No | — | Per-database deprovision outcomes. |
failed_count | integer | No | — | Number of items that failed to tear down. |
status | string | No | — | completed |
failure_reason | string | No | — | Engine failure reason. |
failed_step | json | No | — | Failed step envelope. |
failed_layer | json | No | — | Failed layer envelope. |
failed_at_state | string | No | — | State where failure occurred. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
executing | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | executing | — |
executing | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "deploy.platform.teardown",
"initial_data": {
"organization_uuid": "value",
"gcp_connection_uuid": "value"
}
}