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

provider/vcd: When creating a vcd_vapp resource using DHCP we should wait for the IP Address #5159

Closed
robcoward opened this issue Feb 17, 2016 · 5 comments

Comments

@robcoward
Copy link
Contributor

If the ip property is not passed to a vcd_vapp resource, the resulting VM will use DHCP to allocate an IP Address. Initially the vCloud Director UI will not show an IP Address for the new VM, however once the VM has booted and the open-vm-tools package started, it updates vCloud Director with the DHCP allocated IP Address.

If you subsequently run a "terraform refresh", the resulting tfstate file does also include the correct address in the ip property for the vapp.

It would be really handy if when creating the vcd_vapp resource, if no ip address is specified then it should wait until the vm's open-vm-tools has updated vCloud Director with it's allocated IP address and pull it back. It would open up all sorts of possibilities, not the least being able to configure connection details to bounce off bastion hosts, something like:

resource "vcd_vapp" "webservers" {
    name          = "${format("web%02d", count.index + 1)}"
    count         = "${var.webserver_count}"
    ....
    depends_on    = [ "vcd_vapp.jumpbox" ]
    connection {
        bastion_host = "${var.jumpbox_ext_ip}"
        host         = "${vcd_vapp.webservers.ip}"
    }
    provisioner "chef"  {
        ....
    }            
}
@robcoward
Copy link
Contributor Author

Hi @devopsbrett how much effort would it be to poll vCloud Director and wait for a VM's ip address to be populated ?

@devopsbrett
Copy link
Contributor

Hi @robcoward I'm going to look at this now

@jen20
Copy link
Contributor

jen20 commented Feb 18, 2016

Fixed in #5195.

@jen20 jen20 closed this as completed Feb 18, 2016
@robcoward
Copy link
Contributor Author

@devopsbrett thanks for the quick turn around.

@ghost
Copy link

ghost commented Apr 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants