Overview
Configure the VPC or VNet used by a deployment in each customer environment.
Network configures the VPC or VNet used by a deployment. It covers subnets, NAT, routing, and security groups for services running in a customer environment.
Developers do not instantiate new alien.Network(...) in alien.ts. Network is generated from deployment stack settings when the deployment needs cloud networking.
Platform Mapping
| Platform | Backing Infrastructure |
|---|---|
| AWS | VPC, subnets, route tables, Internet Gateway, NAT Gateway, security group |
| GCP | VPC network, subnetwork, Cloud Router, Cloud NAT, firewall rule |
| Azure | VNet, public/private subnets, NAT Gateway, Public IP, Network Security Group |
| Kubernetes / On-Prem | External cluster networking |
When to Configure Network
Configure Network when the customer environment has specific networking requirements:
- use an isolated VPC/VNet instead of a provider default network
- bring an existing customer-managed VPC/VNet
- choose a CIDR block
- control how private services get outbound internet access
- attach public ingress resources to known public subnets
If no network settings are provided and the stack needs networking, Alien creates the default network shape required by the platform.
Modes
| Mode | Use For | Ownership |
|---|---|---|
create | Production deployments that should have an Alien-managed isolated network | Alien creates and deletes the network infrastructure. |
use-default | Fast dev/test deployments | Alien uses provider defaults where available. |
byo-vpc-aws | Existing AWS VPC | Customer owns routing, egress, subnets, and security posture. |
byo-vpc-gcp | Existing GCP VPC | Customer owns routing, egress, subnet, and firewall posture. |
byo-vnet-azure | Existing Azure VNet | Customer owns routing, egress, subnets, and NSG posture. |
Example Stack Settings
Network settings are supplied with deployment configuration or generated setup files, not in the resource builder.
{
"network": {
"type": "create",
"cidr": "100.88.0.0/16",
"availability_zones": 2
}
}alien render --format terraform --target aws \
--stack ./alien.ts \
--stack-settings ./stack-settings.jsonBring Your Own Network
{
"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"]
}
}BYO modes validate and reference existing infrastructure. Alien does not create or delete the network itself.
See API Reference for all settings and Behavior & Limits for platform-specific behavior.