Hi.
Is there a way to apply domain configuration to /etc/resolv.conf and to ethernet configuration? These are my tf settings:
#define variable from terraform.tvars
variable "vsphere_user" {}
variable "vsphere_password" {}
variable "vsphere_server" {}
variable "vsphere_cluster" {}
variable "vsphere_datacenter" {}
variable "vsphere_domain" {}
variable "vsphere_dns" {}
# Configure the VMware vSphere Provider
provider "vsphere" {
user = "${var.vsphere_user}"
password = "${var.vsphere_password}"
vsphere_server = "${var.vsphere_server}"
allow_unverified_ssl = true
}
# Create a folder
resource "vsphere_folder" "testfolder" {
path = "TEST/Vms"
datacenter = "${var.vsphere_datacenter}"
}
# Create a virtual machine within the folder
resource "vsphere_virtual_machine" "web" {
name = "terraform-web"
folder = "${vsphere_folder.testfolder.path}"
vcpu = 2
memory = 2048
datacenter = "${var.vsphere_datacenter}"
cluster = "${var.vsphere_cluster}"
domain = "my.custom.domain"
gateway = "172.16.1.1"
dns_servers = ["172.16.1.34"]
#resource_pool = ""
network_interface {
label = "virtualwire_Template"
ipv4_address = "172.16.1.2"
ipv4_prefix_length = "28"
}
disk {
template = "TEMPLATE/mytemplate"
}
}
Configurations on new VM are correct on hosts file, but on resolv.conf and eth there is a default value (vsphere.local):
Luca.