gcp.run.service.upsert ​
Create or update a Cloud Run service with full deployment configuration.
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. |
region | string | Yes | — | Cloud Run region. |
service_name | string | Yes | — | Cloud Run service id. |
image | string | Yes | — | Container image URI. |
container_name | string | No | — | Container name. |
port | integer | No | — | Container port. |
env | json | No | — | Plain environment variables. |
secret_env | json | No | — | Env var to Secret Manager secret/version mappings. |
cpu | string | No | — | CPU limit, e.g. 1. |
memory | string | No | — | Memory limit, e.g. 512Mi. |
min_instances | integer | No | — | Minimum instance count. |
max_instances | integer | No | — | Maximum instance count. |
concurrency | integer | No | — | Container concurrency. |
timeout_seconds | integer | No | — | Request timeout. |
service_account | string | No | — | Runtime service account email. |
vpc_connector | string | No | — | Serverless VPC connector resource. |
vpc_egress | string | No | — | VPC egress mode. |
cloud_sql_instances | json | No | — | Cloud SQL instance connection names. |
labels | json | No | — | Service labels. |
annotations | json | No | — | Service/revision annotations. |
traffic | json | No | — | Optional initial traffic split. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Echoed connection UUID. |
project_id | string | No | — | Effective project. |
region | string | No | — | Cloud Run region. |
service_name | string | No | — | Cloud Run service id. |
image | string | No | — | Container image URI. |
container_name | string | No | — | Container name. |
port | integer | No | — | Container port. |
env | json | No | — | Plain environment variables. |
secret_env | json | No | — | Env var to Secret Manager secret/version mappings. |
cpu | string | No | — | CPU limit, e.g. 1. |
memory | string | No | — | Memory limit, e.g. 512Mi. |
min_instances | integer | No | — | Minimum instance count. |
max_instances | integer | No | — | Maximum instance count. |
concurrency | integer | No | — | Container concurrency. |
timeout_seconds | integer | No | — | Request timeout. |
service_account | string | No | — | Runtime service account email. |
vpc_connector | string | No | — | Serverless VPC connector resource. |
vpc_egress | string | No | — | VPC egress mode. |
cloud_sql_instances | json | No | — | Cloud SQL instance connection names. |
labels | json | No | — | Service labels. |
annotations | json | No | — | Service/revision annotations. |
traffic | json | No | — | Optional initial traffic split. |
service_resource_name | string | No | — | Full service resource name. |
service_url | string | No | — | Service URI. |
latest_created_revision | string | No | — | Latest created revision name. |
latest_ready_revision | string | No | — | Latest ready revision name. |
observed_generation | string | No | — | Provider observed generation. |
ready | boolean | No | — | True when service is ready. |
service | json | No | — | Sanitized provider service response. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | json | No | — | Engine failed layer. |
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 | — |
preflighting | No | No | — | execute | — |
upserting | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | preflight | preflighting | — |
preflighting | execute | upserting | — |
upserting | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.run.service.upsert",
"initial_data": {
"connection_uuid": "value",
"region": "value",
"service_name": "value",
"image": "value"
}
}