digitalocean_app dns record with terraform

I’m building my infrastructure with Terraform.

I declared a digitalocean_domain:

resource "digitalocean_domain" "royllo_domain" {
  name = ""

and then, I have my digitalocean_app: resource “digitalocean_app” “royllo_explorer_api_server” {

resource "digitalocean_app" "royllo_explorer_api_server" {
  spec {
    domain {
      name = ""

The app is deployed correcty and I can access it with its ingress address.

The live URL in digital ocean panel is correct: But when I try to access, it doesn’t work and when doing dig 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

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
April 13, 2023
Accepted Answer

Hi there,

I believe that for this you would need to use the zone argument reference as described here in the docs:

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!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel