deploy.database.deprovision ​
Tear down a provisioned database: delete the Cloud SQL instance (cascades) and its credentials secret. Idempotent.
Delete the Cloud SQL instance (cascades db/users) and credentials secret.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-deployments |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID. |
deployment_target_uuid | uuid | No | — | Deployment target (for correlation). |
connection_uuid | uuid | Yes | — | GCP connection UUID. |
project_id | string | No | — | GCP project override. |
region | string | No | — | Cloud SQL region. |
instance_id | string | Yes | — | Cloud SQL instance to delete. |
secret_id | string | No | — | Credentials secret to delete; skipped when omitted. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Organization UUID. |
deployment_target_uuid | uuid | No | — | Deployment target UUID. |
instance_id | string | No | — | Cloud SQL instance id. |
secret_id | string | No | — | Credentials secret id. |
connection_uuid | uuid | No | — | GCP connection UUID (carried through). |
project_id | string | No | — | GCP project (carried through). |
region | string | No | — | Cloud SQL region (carried through). |
workflow_run_uuid | uuid | No | — | DAG run UUID stamped by the engine. |
delete_instance | json | No | — | Result of the gcp.sql.instance.delete step. |
delete_secret | json | No | — | Result of the gcp.secretmanager.secret.delete step (when secret_id set). |
status | string | No | — | Deprovision status. |
failure_reason | string | No | — | Engine failure reason. |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_step | json | No | — | Failed DAG step envelope. |
failed_layer | json | No | — | Failed DAG layer envelope. |
failed_at_state | string | No | — | State where failure occurred. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | deprovision | gcp.sql.instance.delete, gcp.secretmanager.secret.delete | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
gcp.sql.instance.delete | delete_instance |
gcp.secretmanager.secret.delete | delete_secret |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "deploy.database.deprovision",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"instance_id": "value"
}
}