Allow setting of arbitrary DNS resource records.

Description

To allow Guise to be a general tool for static site deployment, we need to be able to set arbitrary resource record entries in the DNS, for example MX records.

The beauty of this feature is that once we indicate the DNS entries in the Guise project file, they are defined independent of the target deployment. This will simplify not only recording (and versioning) site DNS information in a consistent way, it will also make it a breeze to migrate the site to a different provider, as long as the new provider has a new DNS client implementation written.

The records can be indicated in the DNS section of the Guise project file. The resource records should support type, name, value, and ttl, although some of these can be left out for default values.

Here is an example configuration that sets up example.com to use Fastmail to be the mail provider, and includes a verification string for Atlassian domain accounts:

Considerations:

  • The name field should probably be considered a domain name, and should probably have the site domain appended if the name is not a FQDN (i.e. if it does not end in .) (Wikipedia indicates that this should always be a FQDN). Thus fm1._domainkey would be expanded to fm1._domainkey.example.com. See Trailing Dots in Domain Names. Note that we can't just take the site domain name specified in the configuration file, because www.example.com would need to use example.com. Thus the determined hosted zone name is probably what we want to use (the common domain suffix), unless overridden with a FQDN.

  • Should we allow (does Route 53 accept?) missing name fields? Or should we consider a missing name name fields to be an empty field and resolve it against the domain name as per the point above.

  • A ttl should be allowed, but we should probably use some default, allowing it to be absent. We could have a table of default TTLs for each record type; see Dyn: FAQs – Time to Live (TTL), Some thoughts on TTL Values, and An Easy Primer on TTL (Time to Live) for some common values. Several sites (e.g. Fastmail however are recommending one hour (3600) for everything.

The initial implementation should be done on AWS Route 53, as that is the only DNS implementation Guise has at the moment. See Route 53 Supported DNS Record Types for more tips.

Environment

None

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Components

Fix versions

Priority

Critical
Configure