Skip to content
Proud to collaborate with Microsoft for Startups

gcp.sql.instance.ensure ​

Create or return a Cloud SQL PostgreSQL instance.

Overview ​

PropertyValue
Workflow typeLinear
LibraryBase-gcp
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—GCP CloudConnection UUID.
project_idstringNo—GCP project override.
instance_idstringYes—Cloud SQL instance id.
regionstringYes—Cloud SQL region.
database_versionstringNo—Defaults to POSTGRES_16.
tierstringYes—Machine tier, e.g. db-f1-micro.
storage_gbintegerNo—Allocated storage size.
availability_typestringNo—ZONAL or REGIONAL.
private_networkstringNo—VPC selfLink for private IP.
authorized_networksjsonNo—Public authorized networks.
backup_configjsonNo—Backup and PITR settings.
labelsjsonNo—Instance labels.

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Echoed connection UUID.
project_idstringNo—Effective project.
instance_idstringNo—Cloud SQL instance id.
regionstringNo—Cloud SQL region (carried through).
database_versionstringNo—Postgres version (carried through).
tierstringNo—Instance tier (carried through).
storage_gbintegerNo—Storage GB (carried through).
availability_typestringNo—Availability type (carried through).
private_networkstringNo—Private network (carried through).
authorized_networksjsonNo—Authorized networks (carried through).
backup_configjsonNo—Backup config (carried through).
labelsjsonNo—Labels (carried through).
instance_connection_namestringNo—project:region:instance connection name.
self_linkstringNo—Provider selfLink.
operation_namestringNo—Cloud SQL operation name when creation/update started.
createdbooleanNo—True when created during this run.
instancejsonNo—Sanitized instance response.
failure_reasonstringNo—Human-readable failure reason.
failed_stepstringNo—Failed logical step.
failed_layerjsonNo—Engine failed layer.
failed_at_statestringNo—State where failure occurred.
errorstringNo—Error message.
error_typestringNo—Error class.

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—preflight—
ensuringNoNo—complete—
preflightingNoNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingpreflightpreflighting—
preflightingexecuteensuring—
ensuringcompletecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "gcp.sql.instance.ensure",
  "initial_data": {
    "connection_uuid": "value",
    "instance_id": "value",
    "region": "value",
    "tier": "value"
  }
}