Docs

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"
  }
}
FieldTypeRequiredDescription
type"use-default"YesUse provider defaults.

create

Creates an isolated network for the deployment.

{
  "network": {
    "type": "create",
    "cidr": "100.88.0.0/16",
    "availability_zones": 2
  }
}
FieldTypeRequiredDescription
type"create"YesCreate a new VPC/VNet.
cidrstring | nullNoVPC/VNet CIDR. If omitted, Alien generates a non-overlapping /16 candidate.
availability_zonesnumberNoNumber 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"]
  }
}
FieldTypeRequiredDescription
type"byo-vpc-aws"YesAWS BYO VPC mode.
vpc_idstringYesExisting VPC ID.
public_subnet_idsstring[]YesPublic subnet IDs used for public ingress resources.
private_subnet_idsstring[]YesPrivate subnet IDs used for services that should not receive public IPs.
security_group_idsstring[]NoSecurity 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"
  }
}
FieldTypeRequiredDescription
type"byo-vpc-gcp"YesGCP BYO VPC mode.
network_namestringYesExisting VPC network name.
subnet_namestringYesExisting subnet name.
regionstringYesRegion 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"
  }
}
FieldTypeRequiredDescription
type"byo-vnet-azure"YesAzure BYO VNet mode.
vnet_resource_idstringYesFull resource ID of the existing VNet.
public_subnet_namestringYesPublic subnet name.
private_subnet_namestringYesPrivate subnet name.
application_gateway_subnet_namestringNoDedicated subnet for a classic Application Gateway.
private_endpoint_subnet_namestringNoDedicated subnet for Private Endpoints. Required only when the stack contains a Postgres resource.

Outputs

Network outputs are cloud-agnostic and intended for observability.

FieldTypeDescription
networkIdstringHuman-readable cloud network identifier.
availabilityZonesnumberNumber of zones used.
hasPublicSubnetsbooleanWhether public subnets exist.
hasNatGatewaybooleanWhether a managed NAT gateway exists.
cidrstring | nullCIDR block when created by Alien.

On this page