hashicorp / terraform-provider-vsphere

Terraform Provider for VMware vSphere
https://registry.terraform.io/providers/hashicorp/vsphere/
Mozilla Public License 2.0
609 stars 449 forks source link

dns_suffix_list prepends to searchable domains instead of appending #1854

Open nbamrah opened 1 year ago

nbamrah commented 1 year ago

Community Guidelines

Terraform

1.3.6

Terraform Provider

3.0

VMware vSphere

7.0.3

Description

Leveraging the VSphere terraform provider, and when creating a vm with the use of the "dns_suffix_list", we've noticed that this field prepends the specified domains to the search field within the resolv.conf file. We would expect the "dns_suffix_list" to append, so that the primary domain (upon vm creation) remains the main domain searched against first, before checking against the other dns suffixes.

Affected Resources or Data Sources

resource/vsphere_virtual_machine

Terraform Configuration

clone { timeout = 120 template_uuid = data.vsphere_content_library_item.item.id dns_suffix_list = ["test2.com", "test3.com"] }

Debug Output

search test2.com test3.com.com test1.com

Panic Output

No response

Expected Behavior

Expected behavior is for the searchable domains to be in appended order:

search test1.com test2.com test3.com

Actual Behavior

The actual behavior is that the searchable domains are in prepended order:

search test2.com test3.com test1.com

Steps to Reproduce

  1. define searchable domains as a tf list variable
  2. configure vm with searchable domains variable as value for dens_suffix_list
  3. create vm
  4. log into vm and cat resolv.conf (primary domain will be last entry for "search")

Environment Details

No response

Screenshots

No response

References

No response

github-actions[bot] commented 1 year ago

Hello, nbamrah! šŸ–

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.