Subnets
Subnets are created for core components managed within the module, namely:
- Bastion
- Operator
- Control plane (
cp
) - Workers
- Pods
- Internal load balancers (
int_lb
) - Public load balancers (
pub_lb
)
Create new subnets (automatic)
subnets = {
bastion = { newbits = 13 }
operator = { newbits = 13 }
cp = { newbits = 13 }
int_lb = { newbits = 11 }
pub_lb = { newbits = 11 }
workers = { newbits = 2 }
pods = { newbits = 2 }
}
Create new subnets (forced)
subnets = {
bastion = {
create = "always",
netnum = 0,
newbits = 13
}
operator = {
create = "always",
netnum = 1,
newbits = 13
}
cp = {
create = "always",
netnum = 2,
newbits = 13
}
int_lb = {
create = "always",
netnum = 16,
newbits = 11
}
pub_lb = {
create = "always",
netnum = 17,
newbits = 11
}
workers = {
create = "always",
netnum = 1,
newbits = 2
}
}
Create new subnets (CIDR notation)
subnets = {
bastion = { cidr = "10.0.0.0/29" }
operator = { cidr = "10.0.0.64/29" }
cp = { cidr = "10.0.0.8/29" }
int_lb = { cidr = "10.0.0.32/27" }
pub_lb = { cidr = "10.0.128.0/27" }
workers = { cidr = "10.0.144.0/20" }
pods = { cidr = "10.0.64.0/18" }
}
Create new subnets with IPv4 and IPv6 (CIDR notation)
subnets = {
bastion = { cidr = "10.0.0.0/29", ipv6_cidr = "8, 0" }
operator = { cidr = "10.0.0.64/29", ipv6_cidr = "8, 1" }
cp = { cidr = "10.0.0.8/29", ipv6_cidr = "8, 2" }
int_lb = { cidr = "10.0.0.32/27", ipv6_cidr = "8, 3" }
pub_lb = { cidr = "10.0.128.0/27", ipv6_cidr = "8, 4" }
workers = { cidr = "10.0.144.0/20", ipv6_cidr = "2603:c020:8010:f002::/64" }
pods = { cidr = "10.0.64.0/18", ipv6_cidr = "2603:c020:8010:f003::/64" }
}
Use existing subnets
subnets = {
operator = { id = "ocid1.subnet..." }
cp = { id = "ocid1.subnet..." }
int_lb = { id = "ocid1.subnet..." }
pub_lb = { id = "ocid1.subnet..." }
workers = { id = "ocid1.subnet..." }
pods = { id = "ocid1.subnet..." }
}
References
- OCI Networking Overview
- VCNs and Subnets
- Terraform cidrsubnets function