provider/vsphere: provide `host` to provisioner connections
This commit is contained in:
parent
539cbe2b01
commit
71d93d2e5c
|
@ -439,6 +439,15 @@ func resourceVSphereVirtualMachineCreate(d *schema.ResourceData, meta interface{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ip, ok := d.GetOk("network_interface.0.ipv4_address"); ok {
|
||||
d.SetConnInfo(map[string]string{
|
||||
"host": ip.(string),
|
||||
})
|
||||
} else {
|
||||
log.Printf("[DEBUG] Could not get IP address for %s", d.Id())
|
||||
}
|
||||
|
||||
d.SetId(vm.Path())
|
||||
log.Printf("[INFO] Created virtual machine: %s", d.Id())
|
||||
|
||||
|
|
Loading…
Reference in New Issue