API Reference
Network is configured through StackSettings.network. The generated Network resource appears in stack state, but application code does not create it directly.
StackSettings.network
type StackSettings = {
network?: NetworkSettings | null
}use-default
Uses the provider default network when available.
{
"network": {
"type": "use-default"
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | "use-default" | Yes | Use provider defaults. |
create
Creates an isolated network for the deployment.
{
"network": {
"type": "create",
"cidr": "100.88.0.0/16",
"availability_zones": 2
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | "create" | Yes | Create a new VPC/VNet. |
cidr | string | null | No | VPC/VNet CIDR. If omitted, Alien generates a non-overlapping /16 candidate. |
availability_zones | number | No | Number of zones. Default is 2. |
byo-vpc-aws
References an existing AWS VPC.
{
"network": {
"type": "byo-vpc-aws",
"vpc_id": "vpc-0123456789abcdef0",
"public_subnet_ids": ["subnet-public-a", "subnet-public-b"],
"private_subnet_ids": ["subnet-private-a", "subnet-private-b"],
"security_group_ids": ["sg-0123456789abcdef0"]
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | "byo-vpc-aws" | Yes | AWS BYO VPC mode. |
vpc_id | string | Yes | Existing VPC ID. |
public_subnet_ids | string[] | Yes | Public subnet IDs used for public ingress resources. |
private_subnet_ids | string[] | Yes | Private subnet IDs used for services that should not receive public IPs. |
security_group_ids | string[] | No | Security groups to use. |
byo-vpc-gcp
References an existing GCP VPC and subnet.
{
"network": {
"type": "byo-vpc-gcp",
"network_name": "customer-vpc",
"subnet_name": "app-us-central1",
"region": "us-central1"
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | "byo-vpc-gcp" | Yes | GCP BYO VPC mode. |
network_name | string | Yes | Existing VPC network name. |
subnet_name | string | Yes | Existing subnet name. |
region | string | Yes | Region containing the subnet. |
byo-vnet-azure
References an existing Azure VNet.
{
"network": {
"type": "byo-vnet-azure",
"vnet_resource_id": "/subscriptions/.../virtualNetworks/customer-vnet",
"public_subnet_name": "public",
"private_subnet_name": "private"
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | "byo-vnet-azure" | Yes | Azure BYO VNet mode. |
vnet_resource_id | string | Yes | Full resource ID of the existing VNet. |
public_subnet_name | string | Yes | Public subnet name. |
private_subnet_name | string | Yes | Private subnet name. |
application_gateway_subnet_name | string | No | Dedicated subnet for a classic Application Gateway. |
private_endpoint_subnet_name | string | No | Dedicated subnet for Private Endpoints. Required only when the stack contains a Postgres resource. |
Outputs
Network outputs are cloud-agnostic and intended for observability.
| Field | Type | Description |
|---|---|---|
networkId | string | Human-readable cloud network identifier. |
availabilityZones | number | Number of zones used. |
hasPublicSubnets | boolean | Whether public subnets exist. |
hasNatGateway | boolean | Whether a managed NAT gateway exists. |
cidr | string | null | CIDR block when created by Alien. |