Skip to content
Proud to collaborate with Microsoft for Startups

gcp.sql.user.ensure ​

Create or update a PostgreSQL user in Cloud SQL.

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.
usernamestringYes—Database user name.
passwordstringNo—Password to set; generated by caller when omitted.
hoststringNo—Cloud SQL host field, defaults to %.
update_passwordbooleanNo—Whether to update password for existing user.

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Echoed connection UUID.
project_idstringNo—Effective project.
instance_idstringNo—Cloud SQL instance id.
usernamestringNo—User name.
hoststringNo—User host.
update_passwordbooleanNo—Whether to update password for existing user.
createdbooleanNo—True when created during this run.
password_setbooleanNo—True when password was set or updated.
userjsonNo—Sanitized user response without password.
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—execute—
ensuringNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecuteensuring—
ensuringcompletecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "gcp.sql.user.ensure",
  "initial_data": {
    "connection_uuid": "value",
    "instance_id": "value",
    "username": "value"
  }
}