mgc.network.create_subnet ​
Create a subnet inside a Magalu Cloud VPC (connection-bound tenant).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | Base-mgc |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | CloudConnection UUID for the target Magalu account. |
workflow_run_id | string | No | — | Engine DAG run ID stamped onto child steps. |
tenant_id | string | No | — | Magalu project tenant UUID (x-tenant-id) override; defaults to the connection-bound tenant. |
vpc_id | string | Yes | — | VPC id the subnet belongs to. |
name | string | Yes | — | Subnet name. |
cidr_block | string | Yes | — | CIDR block, e.g. 10.0.0.0/24. |
ip_version | string | No | — | IPv4 or IPv6 (default IPv4). |
subnetpool_id | string | No | — | Subnet pool id (required by some accounts). |
dns_nameservers | list | No | — | DNS nameservers for the subnet. |
description | string | No | — | Optional subnet description. |
availability_zone | string | No | — | Availability zone. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | CloudConnection UUID echoed from input. |
subnet_id | string | No | — | Provider subnet id. |
subnet | json | No | — | Provider subnet object. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | string | No | — | DAG layer where failure occurred. |
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 | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "mgc.network.create_subnet",
"initial_data": {
"connection_uuid": "value",
"vpc_id": "value",
"name": "value",
"cidr_block": "value"
}
}