Terraform-VMWare-Modules / terraform-vsphere-vm

Terraform vSphere module for provisioning Virtual Machines
https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm/vsphere/
MIT License
169 stars 176 forks source link

duplicate nameservers in resulting netplan config file #158

Open rudy-l opened 1 year ago

rudy-l commented 1 year ago

Hi, question about dns_server_list variable. When I configure multiple nics the resulting netplan config file is something like that :

# Generated by VMWare customization engine.
network:
  version: 2
  renderer: networkd
  ethernets:
    ens192:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.0.1/24
      nameservers:
        addresses:
          - 192.168.2.1
          - 192.168.3.1
    ens224:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.1.1/24
      gateway4: 192.168.1.254
      nameservers:
        addresses:
          - 192.168.2.1
          - 192.168.3.1

I guess if this is the expected behaviour ? My deployment pipeline (Kubespray) needs these nameservers entries and try to add all of them (4) as upstream DNS, unfortunately this is refused as max number is 3.

Thanks