gcp.run.deploy_service ​
Deploy a container to Cloud Run
Deploys a container image to Google Cloud Run.
Creates or updates a Cloud Run service with the specified container image. The service is configured to allow unauthenticated access by default.
Inputs:
- service_name: Name of the Cloud Run service (required).
- image: Container image URL (required, e.g., gcr.io/project/image:tag).
- region: GCP region where the service will be deployed (optional, default: us-central1).
- port: Container port (optional, default: 8080).
- memory: Memory allocated (optional, default: 256Mi).
- cpu: CPU allocated (optional, default: 1).
- min_instances: Minimum number of instances (optional, default: 0).
- max_instances: Maximum number of instances (optional, default: 100).
- connection_uuid: Cloud connection UUID for GCP credentials (required).
Outputs (terminal state_data):
- service_name: str — Cloud Run service name
- service_url: str — URL of the deployed service
- region: str — region where deployed
- image: str — container image URL
- revision: str — revision name
- ready: bool — whether service is ready
Compensation: Use gcp.run.delete_service to undo. Plugin required: context.get_plugin("gcp") must expose .get_run_client() and .get_project_id_for_connection().
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | Base |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
service_name | string | Yes | — | Cloud Run service name |
image | string | Yes | — | Container image URL |
region | string | No | — | GCP region (default: us-central1) |
port | integer | No | — | Container port (default: 8080) |
memory | string | No | — | Memory (default: 256Mi) |
cpu | float | No | — | CPU (default: 1) |
min_instances | integer | No | — | Min instances (default: 0) |
max_instances | integer | No | — | Max instances (default: 100) |
connection_uuid | uuid | Yes | — | Cloud connection UUID for GCP credentials |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
image | string | No | — | — |
ready | boolean | No | — | — |
region | string | No | — | — |
revision | integer | No | — | — |
service_name | string | No | — | — |
service_url | string | No | — | — |
connection_uuid | uuid | No | — | — |
cpu | float | No | — | — |
max_instances | integer | No | — | — |
memory | string | No | — | — |
min_instances | integer | No | — | — |
port | integer | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/v1/workflows/gcp.run.deploy_service/start
Content-Type: application/json
{ ... input fields ... }