dirien / pulumi-vultr

Pulumi provider for Vultr
Apache License 2.0
17 stars 1 forks source link

vultr.DnsRecord - MX and CNAME records #141

Closed dR3b closed 2 months ago

dR3b commented 1 year ago

Hi,

when I created a new domain via "vultr.DnsRecord", it automatically adds a MX and a CNAME record. Why? How can I delete them?

import pulumi
import ediri_vultr as vultr

my_domain = vultr.DnsDomain("foobar", domain="foobar.foo", ip="1.2.3.4")
A     1.2.3.4         300
CNAME * foobar.foo    300
MX    foobar.foo      300 10
NS    ns1.vultr.com   300
NS    ns2.vultr.com   300

Thanks

dirien commented 1 year ago

Hey @dR3b,

according to the docs, you should create the DnsDomain resource without the IP address no records will be created.

And the. you can use DnsRecord to create the records!

dR3b commented 1 year ago

Thanks! I only saw the example on this page: https://www.pulumi.com/registry/packages/vultr/api-docs/dnsdomain/

import pulumi
import ediri_vultr as vultr

my_domain = vultr.DnsDomain("myDomain",
    domain="domain.com",
    ip="66.42.94.227")
dirien commented 1 year ago

yeah, that's the official example from the Vultr TF provider! I had to check the Vultr API docs for more details! 🙈