Skip to content

cloud-init/network-data

The cloud-init network-config to write after first boot.

A YAML string written as the NoCloud network-config seed file after image deployment. Must be in cloud-init network-config v2 (netplan) format.

When this param is absent, no network-config seed file is written and the image's own network configuration is left intact. Most cloud images (Ubuntu, Debian, AlmaLinux, Rocky) already ship with DHCP configured and do not need this param. Set it only when you need to override networking or when deploying a minimal image that has no network config of its own.

Example (DHCP on all ethernet interfaces)::

version: 2 ethernets: all-en: match: name: "en*" dhcp4: true optional: true

Example (static IP)::

version: 2 ethernets: eth0: addresses: [192.168.1.10/24] gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8]

Objects that Reference cloud-init/network-data

Not used in current content packs

Objects used by cloud-init/network-data

Not used in current content packs