Chicken-egg problem with StackScript and ip address

I want to deploy web servers through StackScript with certbot to set up HTTPS certificates. Linode's StackScript Bash Library provides a function to do so, so this seems to be a legit use case.

But my domains are managed by a different provider through a web interface. In order to set up the DNS records, I need the IP address of the VM, which is only available after creation of the VM.

So I don't see how I can use certbot within a StackScript, since it requires proper set up of DNS records.

How can I resolve this chicken-egg problem?

2 Replies

How automated do you need this to be?

You could deploy a new Linode with a standard image to get the IP address, add the IP to your DNS, then rebuild the Linode with your StackScript.

Alternatively does your DNS provider have an API?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct