-
Notifications
You must be signed in to change notification settings - Fork 35
Fetch the machines IPs or hostnames with terraform show #17
Comments
Cool idea! I crated a pull request for that. :-) |
Actually that pull request doesn't fetch the IP address, just the hostname. I've done a pull pull request to @andreaspeters branch adding the ip address logic. |
@nferro thats great. thanks for that. :-) |
Any chance of that PR being merged into the vmware master branch, having the IP would be essential for me too. |
+1 |
Likewise. The VM is pretty useless if we can't automate it after creation and for that we need the name and/or the IP. This is bog standard stuff. Can we get this change merged, please? Thanks. |
I've created PR #66 to grab the IP address. |
Can somebody please explain how this is supposed to work? I can't find any way to retrieve the machine name, despite the discussion about it. I try this:
It usually doesn't work. I have noticed that, for some reason, Private Cloud 2 doesn't show an IP address for a machine that has just been created and when that's the case, Terraform doesn't return it through this component. Once the IP appears, I did manage to return an IP on one occassion but, even then, it won't connect, presumably due to the SSH prompt to approve the key. How do I deal with that when I DO get an address? Finally, I followed through this discussion and tried retrieving the name but can't make that work, either. I tried creating a field in I'd appreciate an explanation of how this works and what use it is if we can't access either the name or the IP immediately after creation, because I'm beaten again. Thanks. |
I think it depends on how ip addresses are assigned. DHCP addresses cannot be predictably assigned in a time window. The API returns the ip address only after the address is assigned and data-collected. On the other hand, if the ip address comes from an ip pool, vRA controls the address and is able to provide the right value. Can you please try this with ip-pool-based address assignment. |
Hi, Thanks, @raghavav . No, I don't control the system and it wouldn't be worth my time trying to make it happen. That isn't very useful but if I can get the name I might stil be OK. It looks lke vRA has fallen well short of expectations and that we're moving to AWS but, in the meantime, how do I get the name? Many thanks. |
OK, thanks. I'll try again. |
Provisioning is working for me using the machine name, now, after updating and fiddling with the timeout and some other parameters. Thanks again. For anyone following who's looking for a working solution, the
The IP address is retrieved if vRA has populated the field but it usually doesn't do that fast enough. I use outputs to display the name and IP on completion. If you do that you can retrieve both at any time with Cheers. |
None of this is working for me.
gives error:
|
Hello,
I am currently using terraform to provision my infrastructure and Ansible to configure the software pieces.
So, once
terraform apply
executed, I would like terraform to fetch the IPs or hostnames of the machines in order to populate my Ansible host file.I am currently running this workflow with the vSphere and AWS terraform provider and would like to do the same with the vRA 7 terraform provider.
Thanks.
The text was updated successfully, but these errors were encountered: