I’m building my infrastructure with Terraform.
I declared a digitalocean_domain
:
resource "digitalocean_domain" "royllo_domain" {
name = "royllo.org"
}
and then, I have my digitalocean_app
:
resource “digitalocean_app” “royllo_explorer_api_server” {
resource "digitalocean_app" "royllo_explorer_api_server" {
spec {
...
domain {
name = "api.explorer.royllo.org"
}
...
}
}
The app is deployed correcty and I can access it with its ingress address.
The live URL in digital ocean panel is correct: api.explorer.royllo.org
But when I try to access api.explorer.royllo.org
, it doesn’t work and when doing dig royllo.org any
there is not DNS record for my App…
What am I missing ?
I thought setting domain {}
would be enough.
I also tried to create a digitalocean_record
but i don’t know what to set in the value parameter as app doesn’t seem to return an IP
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi there,
I believe that for this you would need to use the zone
argument reference as described here in the docs:
https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/app#zone
zone
- If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account.
Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.