diff --git a/src/providers/proxmoxve/cloudconfig.rs b/src/providers/proxmoxve/cloudconfig.rs index 0e874a88..cf4a3fc1 100644 --- a/src/providers/proxmoxve/cloudconfig.rs +++ b/src/providers/proxmoxve/cloudconfig.rs @@ -157,12 +157,14 @@ impl MetadataProvider for ProxmoxVECloudConfig { .map(|entry| entry.to_interface()) .collect::, _>>()?; - if let Some(nameserver) = nameservers.first() { - interfaces[0].nameservers = nameserver - .address - .iter() - .map(|ip| IpAddr::from_str(ip)) - .collect::, AddrParseError>>()?; + if let Some(iface) = interfaces.first_mut() { + if let Some(nameserver) = nameservers.first() { + iface.nameservers = nameserver + .address + .iter() + .map(|ip| IpAddr::from_str(ip)) + .collect::, AddrParseError>>()?; + } } Ok(interfaces)