Closed mkopnsrc closed 10 months ago
Update on this issue,
It seems that you can have multiple DNS servers in a single string format with space in between, which it seem to worked for me. However, for the proper formatting of the values, it should be in object format.
Proxmox Release = 8.1 Proxmox Version = 8.1.3 Terraform Version = 1.6.6 Terraform Module = bpg/proxmox v0.40.0
Hi @mkopnsrc! 👋🏼
I think this is already supported, albeit not documented.
PVE does not provide an option to specify a list of DNS servers as separate items neither in UI, nor in APIs:
But we can use a space-separated lists of IPs instead (tested with ubuntu cloud image):
dns {
domain = "example.com"
server = "192.168.3.1 192.168.1.1"
}
Then, on the VM itself:
ubuntu@test:~$ resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (eth0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.3.1
DNS Servers: 192.168.3.1 182.168.1.1
DNS Domain: example.com
I appreciate your quick response, yes you're correct. Would be still possible to support the object based at the module level and when executing on PVE side, it would convert it to string format ?
The object level formatting on code would help admins to spot multiple entries easier and enables for comment for each DNS entries. Ex:
That would break backward compatibility with existing deployments. We could probably add a new attribute servers
there, keeping the old server
for compatibility.
@all-contributors please add @mkopnsrc for financial
@bpg
I've put up a pull request to add @mkopnsrc! :tada:
Thank you @bpg for your support.
Is your feature request related to a problem? Please describe. Currently based on documentation and example, it only shows and supports single DNS server IP in the proxmox_virtual_environment_container dns -> server block. Normally everyone uses internal DNS servers rather then public DNS servers shown in example. Multiple DNS servers allows containers and VMs for failover DNS Resolve.
Describe the solution you'd like A clear and concise description of what you want to happen. Please add the feature to allow multiple DNS servers in the server block as shown below.
Describe alternatives you've considered Alternatively, when deploying container when no DNS server block provided it should automatically inherit the PVE Node Host DNS servers into container which is by default it's built-on feature within Proxmox VE.
Additional context None