Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Windows please allow map for DNS server addresses #48

Open
ddubick opened this issue Oct 19, 2020 · 3 comments
Open

For Windows please allow map for DNS server addresses #48

ddubick opened this issue Oct 19, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ddubick
Copy link

ddubick commented Oct 19, 2020

I ran into a scenario where I am attaching Network Adapters that connect to completely separate networks (in this case 1 to the corporate networks and redundant links to an iSCSI network).
When I used the module as-is it set DNS server entries on the iSCSI networks and then registered the (invalid) IPs on the corporate DNS servers which made the server inaccessable.
I copied the module local and made changes so that there is a separate win-dns variable that is a map where I can assign different servers to the separate network adapters.
My implementation is dirty so I thought I'd just make an issue for the experts to implement.
Thank you.

@ddubick
Copy link
Author

ddubick commented Oct 19, 2020

Also as I'm only interested in windows servers at this point my code only really addresses the issue on windows. From the vsphere provider documentation it seems like the same isn't possible on linux and I don't have the time to try to make it backwards compatible with the linux side of the implementation.

@Arman-Keyoumarsi
Copy link
Member

Did you use dns_domain ?

dns_domain - (Optional) Network interface-specific DNS search domain for Windows operating systems. Ignored on Linux and possibly other operating systems - for those systems, please see the global DNS settings section.

@Arman-Keyoumarsi Arman-Keyoumarsi added the enhancement New feature or request label Oct 26, 2020
@ddubick
Copy link
Author

ddubick commented Oct 29, 2020

Did you use dns_domain ?

dns_domain - (Optional) Network interface-specific DNS search domain for Windows operating systems. Ignored on Linux and possibly other operating systems - for those systems, please see the global DNS settings section.

No I used dns_server_list. Sorry should have mentioned that.

  dynamic "network_interface" {
    for_each = var.network_cards
    content {
      ipv4_address = var.ipv4[var.network_cards[network_interface.key]][count.index]
      ipv4_netmask = "%{if local.interface_count == 1}${var.ipv4submask[0]}%{else}${var.ipv4submask[network_interface.key]}%{endif}"
      dns_server_list = lookup(var.ipv4dns,var.network_cards[network_interface.key])
    }
  }
  dns_suffix_list = var.dns_suffix_list
  ipv4_gateway    = var.vmgateway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants