how long does it take for ip_address field to show up upon droplet creation?

  • Posted May 9, 2014

when I create a droplet, it doesn’t return the ip_address.

I look at my dashboard and it seems that ip address becomes initially available early on during the progress.

On average how long does it take until ip address is returned by a droplet still being provisioned?

I also noticed that event_id is not available as well.

So my hope is that if I can get ip_address as soon as possible, I can immediately start creating dns records for it to point my subdomains to, instead of waiting until the whole provision is complete.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Right. Again, it should be available quickly. It’s just not there if you hit the endpoint immediately after creation.

thank you. I guess do the same thing to check for event_id, and get progress data as well?

The ip_address should be assigned quickly, but as you’ve noticed it is not instantaneous. The same goes for the event_id. Unfortunately, you just need to workaround this. Here’s some (pseudo) Python code: <br> <br><pre> <br> info = droplet.get_info() <br> loading = True <br> while loading: <br> info.load() <br> try: <br> ip_address = info[“ip_address”] <br> loading = False <br> except TypeError: # Not yet reporting an ip yet <br> pass <br> # Now do something <br></pre> <br> <br>This is similar to something I really use in a project. It generally will get the IP the second time through the loop, but you might want to add a small sleep in case you’re worried about the number of network requests.