subnet
Manage subnets within a VPC.
Commands
| Command | Description |
|---|---|
| list | List all subnets in a VPC |
| get | Get details of a subnet |
| create | Create a new subnet |
| delete | Delete a subnet |
list
List all subnets within a VPC.
Synopsis
Options
--vpc-id (required)
: VPC (network) ID.
--page (integer)
: Page number, 1-based. Default: 1.
--page-size (integer)
: Number of items per page. Default: 50.
Examples
grn vserver subnet list --vpc-id net-abc12345-0000-0000-0000-000000000001
grn vserver subnet list --vpc-id net-abc12345-0000-0000-0000-000000000001 --output table
get
Get details of a subnet.
Synopsis
Options
--vpc-id (required)
: VPC (network) ID that the subnet belongs to.
--subnet-id (required)
: Subnet UUID.
Examples
grn vserver subnet get \
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
--subnet-id sub-abc12345-0000-0000-0000-000000000001
create
Create a new subnet inside a VPC.
Synopsis
Options
--vpc-id (required)
: VPC (network) ID to create the subnet in.
--cidr (required)
: CIDR block for the subnet, e.g. 10.0.1.0/24. Must be within the VPC CIDR range and must not overlap with other subnets.
--zone-id (required)
: Availability zone ID. Omit this flag to see available zones printed to stderr.
--name (string)
: Subnet name.
Examples
grn vserver subnet create \
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
--cidr 10.0.1.0/24 \
--zone-id zone-abc123 \
--name subnet-app
delete
Delete a subnet. Shows a confirmation prompt unless --force is used.
Synopsis
Options
--vpc-id (required)
: VPC (network) ID that the subnet belongs to.
--subnet-id (required)
: Subnet UUID.
--force (boolean)
: Skip the confirmation prompt.