Report this

What is the reason for this report?

Terraform digitalocean_loadbalancer creating A record for root domain

Posted on January 25, 2021

Hey all,

I was reading the docs at https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/loadbalancer and made a code for creating a load balancer, a couple servers, a mysql managed database and some structures like VPC and projects.

The issue is, when creating the load balancer, the module calls the api, and then it creates a A record for the root domain. So, if I manage the domain foo.com, where the record (A, foo.com) points to (192.168.10.10), I get another extra (A, foo.com) record pointing to the load balancer ip address.

The issue is documented here https://github.com/digitalocean/terraform-provider-digitalocean/issues/456 and I only figured out the issue after being alerted about an outage on our systems pointing to the original (A, foo.com) record. Do you people know any workaround on that?



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!

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.

Hi there,

Just wanted to provide a quick update here. The API now supports setting disable_lets_encrypt_dns_records to disable this behavior.

https://docs.digitalocean.com/reference/api/api-reference/#operation/create_load_balancer

This has also been ported to the Terraform Provider as well:

https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/loadbalancer

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.