gcp.secretmanager.secret.ensure ​
Ensure a GCP Secret Manager secret exists with labels, replication, and retention policy.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | Base-gcp |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | GCP CloudConnection UUID. |
project_id | string | No | — | GCP project override. |
secret_id | string | Yes | — | Secret Manager secret id. |
labels | json | No | — | Labels to apply to the secret. |
replication | json | No | — | Automatic or user-managed replication config. |
expire_time | string | No | — | Optional ISO-8601 expiration timestamp. |
ttl_seconds | integer | No | — | Optional time-to-live in seconds. |
annotations | json | No | — | Deployment metadata to carry in labels or provider annotations when supported. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Echoed connection UUID. |
project_id | string | No | — | Effective project id. |
secret_id | string | No | — | Secret id. |
secret_name | string | No | — | Full secret resource name. |
created | boolean | No | — | True when the secret was newly created. |
updated | boolean | No | — | True when metadata was patched. |
etag | string | No | — | Provider etag. |
labels | json | No | — | Effective labels. |
replication | json | No | — | Automatic or user-managed replication config. |
expire_time | string | No | — | Optional ISO-8601 expiration timestamp. |
ttl_seconds | integer | No | — | Optional time-to-live in seconds. |
annotations | json | No | — | Deployment metadata to carry in labels or provider annotations when supported. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | json | No | — | Engine 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 | — | preflight | — |
ensuring | No | No | — | complete | — |
preflighting | No | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | preflight | preflighting | — |
preflighting | execute | ensuring | — |
ensuring | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.secretmanager.secret.ensure",
"initial_data": {
"connection_uuid": "value",
"secret_id": "value"
}
}