Skip to content

Commit

Permalink
provider/vsphere: provide host to provisioner connections
Browse files Browse the repository at this point in the history
  • Loading branch information
higebu committed Mar 10, 2016
1 parent 2dc1c02 commit 0a534f2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func resourceVSphereVirtualMachineCreate(d *schema.ResourceData, meta interface{
}
}

if _, ok := d.GetOk("network_interface.0.ipv4_address"); !ok {
if ip, ok := d.GetOk("network_interface.0.ipv4_address"); !ok {
if v, ok := d.GetOk("boot_delay"); ok {
stateConf := &resource.StateChangeConf{
Pending: []string{"pending"},
Expand All @@ -438,6 +438,10 @@ func resourceVSphereVirtualMachineCreate(d *schema.ResourceData, meta interface{
return err
}
}
} else {
d.SetConnInfo(map[string]string{
"host": ip.(string),
})
}
d.SetId(vm.Path())
log.Printf("[INFO] Created virtual machine: %s", d.Id())
Expand Down

0 comments on commit 0a534f2

Please sign in to comment.