gcp.compute.instance_group_manager.ensure ​
Create or update a GCE managed instance group (MIG) for runner autoscaling in a customer GCP project via a CloudConnection UUID.
Create or update a GCE managed instance group (MIG) for runner autoscaling.
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; defaults to the connection project. |
region | string | No | — | GCP region for a regional managed instance group; mutually exclusive with zone. |
zone | string | No | — | GCP zone for a zonal managed instance group; mutually exclusive with region. |
name | string | Yes | — | Managed instance group name. |
base_instance_name | string | No | — | Base name used to generate instance names in the group. |
instance_template | string | Yes | — | Instance template name or selfLink backing the managed instance group. |
target_size | integer | No | — | Desired number of instances in the group. |
description | string | No | — | Managed instance group description. |
named_ports | json | No | — | Provider namedPorts payload for the managed instance group. |
auto_healing_policies | json | No | — | Provider autoHealingPolicies payload. |
update_policy | json | No | — | Provider updatePolicy payload governing rolling updates. |
distribution_policy | json | No | — | Provider distributionPolicy payload for regional groups. |
autoscaling_policy | json | No | — | Provider autoscaler policy payload for MIG autoscaling. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | GCP CloudConnection UUID echoed from input. |
project_id | string | No | — | Effective GCP project. |
authenticated_project_id | string | No | — | Project resolved by credential validation. |
auth_validation | boolean | No | — | True when credential validation succeeded. |
default_service_account | string | No | — | Default compute service account when resolved. |
region | string | No | — | GCP region for a regional managed instance group. |
zone | string | No | — | GCP zone for a zonal managed instance group. |
name | string | No | — | Managed instance group name. |
base_instance_name | string | No | — | Base name used to generate instance names in the group. |
instance_template | string | No | — | Instance template name or selfLink backing the managed instance group. |
target_size | integer | No | — | Desired number of instances in the group. |
description | string | No | — | Managed instance group description. |
named_ports | json | No | — | Provider namedPorts payload for the managed instance group. |
auto_healing_policies | json | No | — | Provider autoHealingPolicies payload. |
update_policy | json | No | — | Provider updatePolicy payload governing rolling updates. |
distribution_policy | json | No | — | Provider distributionPolicy payload for regional groups. |
autoscaling_policy | json | No | — | Provider autoscaler policy payload for MIG autoscaling. |
created | boolean | No | — | True when the managed instance group was created rather than updated. |
provider_resource_id | string | No | — | projects/{project}/{regions |
instance_group | string | No | — | SelfLink of the instance group managed by this MIG. |
operation_name | string | No | — | Compute Engine long-running operation name. |
operation_status | string | No | — | Initial provider operation status. |
operation | json | No | — | Sanitized provider operation response. |
instance_group_manager | json | No | — | Sanitized managed instance group resource after ensure. |
failure_reason | string | No | — | Human-readable failure reason. |
failure_type | string | No | — | Engine exception class. |
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. |
failed_at | string | No | — | ISO failure timestamp. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | preflight | — |
creating | 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 | creating | — |
creating | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.compute.instance_group_manager.ensure",
"initial_data": {
"connection_uuid": "value",
"name": "value",
"instance_template": "value"
}
}