New example: Typical DNS records.

This commit is contained in:
Tom Limoncelli 2017-03-22 15:20:19 -04:00
parent 7073b8f989
commit be192526ef

View file

@ -7,6 +7,31 @@ layout: default
* TOC
{:toc}
## Typical DNS Records
{% highlight javascript %}
D('example.com', REG, DnsProvider('GCLOUD'),
A('@', '1.2.3.4'), // The naked or 'apex' domain.
A('server1', '2.3.4.5'),
AAAA('wide', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'),
CNAME('www', 'server1'),
CNAME('another', 'service.mycloud.com.'),
MX('mail, 10, 'mailserver'),
MX('mail', 20, 'mailqueue'),
TXT('the', 'message'),
NS('delegated', 'ns1.dnsexample.com.'),
NS('delegated', 'ns2.dnsexample.com.'),
)
{% endhighlight %}
## Set a specific TTL for a record
{% highlight javascript %}
A('one', '1.2.3.4', TTL(400)),
{% endhighlight %}
## Variables for common IP Addresses
{% highlight javascript %}
@ -72,4 +97,4 @@ D("example3.com", REG, DnsProvider("R53"), DnsProvider("GCLOUD",0),
A("@", "1.2.3.4")
)
{% endhighlight %}
{% endhighlight %}