sst / sst

Build full-stack apps on your own infrastructure.
https://sst.dev
MIT License
24.07k stars 1.86k forks source link

CloudFlare DNS + SES Email Broken #5919

Open timcosta opened 3 weeks ago

timcosta commented 3 weeks ago

Hey all -

I believe 3.16 introduced a bug in the sst.aws.Email component when using sst.cloudflare.dns as the DNS provider. I get this error:

EmailTXTRecordDmarcmydomaincom cloudflare:index:DnsRecord
cloudflare:index/dnsRecord:DnsRecord resource 'EmailTXTRecordDmarcmydomaincom' has a problem: Missing required property 'zoneId': Identifier.

Downgrading to 3.14.29 resolves the issue. All other DNS records are working as expected on 3.17.x, except when used with cloudflare dns.

My code is essentially:

    const cloudflareDns = sst.cloudflare.dns({
      zone: 'abcedfgghihdidldhldkjdljdl', // mydomain
    });
    ...snip...
    const email = new sst.aws.Email("Email", {
      sender: baseDomain,
      dmarc: "v=DMARC1; p=quarantine; adkim=s; aspf=s;",
      dns: cloudflareDns,
    });

Let me know if you need any other details!