Skip to main content

Network

A Network resource defines a VPC and its subnets for a region. Networks must be created before Compute resources that reference them.

A network resource lives in a folder under regional/network/<name>/:

regional/network/ingress/
manifest.yaml # required — the network spec

Schema

manifest.yaml:

name: ingress # required — used as a foreign key by compute resources
container: ingress # required — logical grouping label
provider: hetzner # optional — inherits from inforge.yaml providers.compute if omitted
cidr: 10.0.0.0/16 # required — CIDR block for the network

subnets: # optional — list of subnets within the network
- name: main
cidr: 10.0.1.0/24

Fields

FieldTypeRequiredDescription
namestringYesResource name. Used as the foreign key in compute specs.
containerstringYesGrouping label. Used in URNs and tags.
providerstringNoMust be hetzner. Inherits from inforge.yaml providers.compute if omitted.
cidrstringYesCIDR block for the network.
subnetsarrayNoList of subnets. Each entry requires name and cidr.

Example

regional/network/ingress/manifest.yaml
name: ingress
container: ingress
provider: hetzner
cidr: 10.0.0.0/16
subnets:
- name: main
cidr: 10.0.1.0/24
- name: db
cidr: 10.0.2.0/24

Outputs

For each subnet the Hetzner network provider returns:

OutputDescription
networkIDHetzner network ID (referenced internally by compute)
subnetIDSubnet ID

Compute resources reference their network by name. When a network has multiple subnets, set subnet to the desired subnet name; otherwise the first declared subnet is used:

# in regional/compute/bridge/manifest.yaml
network: ingress
subnet: main # optional when there is only one subnet