diff --git a/documentation/assets/getting-started/dnsconfig.js b/documentation/assets/getting-started/dnsconfig.js index a798929c0..c78d09835 100644 --- a/documentation/assets/getting-started/dnsconfig.js +++ b/documentation/assets/getting-started/dnsconfig.js @@ -4,11 +4,11 @@ // Providers: -var REG_NONE = NewRegistrar('none'); // No registrar. -var DNS_BIND = NewDnsProvider('bind'); // ISC BIND. +var REG_NONE = NewRegistrar("none"); // No registrar. +var DNS_BIND = NewDnsProvider("bind"); // ISC BIND. // Domains: -D('example.com', REG_NONE, DnsProvider(DNS_BIND), - A('@', '1.2.3.4') +D("example.com", REG_NONE, DnsProvider(DNS_BIND), + A("@", "1.2.3.4") ); diff --git a/documentation/functions/domain/A.md b/documentation/functions/domain/A.md index 71839ffd3..8c1dbd1f3 100644 --- a/documentation/functions/domain/A.md +++ b/documentation/functions/domain/A.md @@ -18,7 +18,7 @@ Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/la {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@", "1.2.3.4"), A("foo", "2.3.4.5"), A("test.foo", IP("1.2.3.4"), TTL(5000)), diff --git a/documentation/functions/domain/AAAA.md b/documentation/functions/domain/AAAA.md index b0d712190..b1d2f7a66 100644 --- a/documentation/functions/domain/AAAA.md +++ b/documentation/functions/domain/AAAA.md @@ -20,7 +20,7 @@ Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/la ```javascript var addrV6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334" -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), AAAA("@", addrV6), AAAA("foo", addrV6), AAAA("test.foo", addrV6, TTL(5000)), diff --git a/documentation/functions/domain/ALIAS.md b/documentation/functions/domain/ALIAS.md index 2a148c898..f7ef804eb 100644 --- a/documentation/functions/domain/ALIAS.md +++ b/documentation/functions/domain/ALIAS.md @@ -20,7 +20,7 @@ Target should be a string representing the target. If it is a single label we wi {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("CLOUDFLARE"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), ALIAS("@", "google.com."), // example.com -> google.com ); ``` diff --git a/documentation/functions/domain/CAA.md b/documentation/functions/domain/CAA.md index 97bdce3c9..bcea06202 100644 --- a/documentation/functions/domain/CAA.md +++ b/documentation/functions/domain/CAA.md @@ -26,7 +26,7 @@ Flags are controlled by modifier: {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("GCLOUD"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // Allow letsencrypt to issue certificate for this domain CAA("@", "issue", "letsencrypt.org"), // Allow no CA to issue wildcard certificate for this domain diff --git a/documentation/functions/domain/CNAME.md b/documentation/functions/domain/CNAME.md index efdfcb122..739ca5ab0 100644 --- a/documentation/functions/domain/CNAME.md +++ b/documentation/functions/domain/CNAME.md @@ -17,7 +17,7 @@ Target should be a string representing the CNAME target. If it is a single label {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), CNAME("foo", "google.com."), // foo.example.com -> google.com CNAME("abc", "@"), // abc.example.com -> example.com CNAME("def", "test"), // def.example.com -> test.example.com diff --git a/documentation/functions/domain/DS.md b/documentation/functions/domain/DS.md index ccaaf2c48..ae9cc25f0 100644 --- a/documentation/functions/domain/DS.md +++ b/documentation/functions/domain/DS.md @@ -28,7 +28,7 @@ Digest must be a string. {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider(R53), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DS("example.com", 2371, 13, 2, "ABCDEF") ); ``` diff --git a/documentation/functions/domain/DefaultTTL.md b/documentation/functions/domain/DefaultTTL.md index a0eac7e89..7df9b7b3a 100644 --- a/documentation/functions/domain/DefaultTTL.md +++ b/documentation/functions/domain/DefaultTTL.md @@ -14,7 +14,7 @@ NS records are currently a special case, and do not inherit from `DefaultTTL`. S {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DefaultTTL("4h"), A("@","1.2.3.4"), // uses default A("foo", "2.3.4.5", TTL(600)) // overrides default diff --git a/documentation/functions/domain/INCLUDE.md b/documentation/functions/domain/INCLUDE.md index 20d13baba..64944668e 100644 --- a/documentation/functions/domain/INCLUDE.md +++ b/documentation/functions/domain/INCLUDE.md @@ -11,11 +11,11 @@ Includes all records from a given domain {% code title="dnsconfig.js" %} ```javascript -D("example.com!external", REG_MY_PROVIDER, DnsProvider(R53), +D("example.com!external", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("test", "8.8.8.8") ); -D("example.com!internal", REG_MY_PROVIDER, DnsProvider(R53), +D("example.com!internal", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), INCLUDE("example.com!external"), A("home", "127.0.0.1") ); diff --git a/documentation/functions/domain/MX.md b/documentation/functions/domain/MX.md index c2e37f807..e5ba4b27d 100644 --- a/documentation/functions/domain/MX.md +++ b/documentation/functions/domain/MX.md @@ -20,7 +20,7 @@ Target should be a string representing the MX target. If it is a single label we {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider(R53), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), MX("@", 5, "mail"), // mx example.com -> mail.example.com MX("sub", 10, "mail.foo.com.") ); diff --git a/documentation/functions/domain/NAMESERVER_TTL.md b/documentation/functions/domain/NAMESERVER_TTL.md index bb32d563c..f2d40cdb8 100644 --- a/documentation/functions/domain/NAMESERVER_TTL.md +++ b/documentation/functions/domain/NAMESERVER_TTL.md @@ -14,7 +14,7 @@ The value can be an integer or a string. See [`TTL`](../record/TTL.md) for examp {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NAMESERVER_TTL("2d"), NAMESERVER("ns") ); @@ -25,7 +25,7 @@ Use `NAMESERVER_TTL("3600"),` or `NAMESERVER_TTL("1h"),` for a 1h default TTL fo {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("xyz"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DefaultTTL("4h"), NAMESERVER_TTL("3600"), NAMESERVER("ns1.provider.com."), //inherits NAMESERVER_TTL diff --git a/documentation/functions/domain/NAPTR.md b/documentation/functions/domain/NAPTR.md index 33a1583f3..afb847393 100644 --- a/documentation/functions/domain/NAPTR.md +++ b/documentation/functions/domain/NAPTR.md @@ -187,7 +187,7 @@ D("4.3.2.1.5.5.5.0.0.8.1.e164.arpa.", REG_MY_PROVIDER, DnsProvider(R53), {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider(R53), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NAPTR("@", 20, 50, "s", "SIPS+D2T", "", "_sips._tcp.example.com."), NAPTR("@", 20, 50, "s", "SIP+D2T", "", "_sip._tcp.example.com."), NAPTR("@", 30, 50, "s", "SIP+D2U", "", "_sip._udp.example.com."), @@ -208,7 +208,7 @@ D("example.com", REG_MY_PROVIDER, DnsProvider(R53), {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider(R53), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NAPTR("@",100, 50, "a", "z3950+N2L+N2C", "", "cidserver.example.com."), NAPTR("@", 50, 50, "a", "rcds+N2C", "", "cidserver.example.com."), NAPTR("@", 30, 50, "s", "http+N2L+N2C+N2R", "", "www.example.com."), diff --git a/documentation/functions/domain/NS.md b/documentation/functions/domain/NS.md index a1198a9d9..2d9bb3f3a 100644 --- a/documentation/functions/domain/NS.md +++ b/documentation/functions/domain/NS.md @@ -20,7 +20,7 @@ Target should be a string representing the NS target. If it is a single label we {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NS("foo", "ns1.example2.com."), // Delegate ".foo.example.com" zone to another server. NS("foo", "ns2.example2.com."), // Delegate ".foo.example.com" zone to another server. A("ns1.example2.com", "10.10.10.10"), // Glue records diff --git a/documentation/functions/domain/SOA.md b/documentation/functions/domain/SOA.md index 8549d9fb9..e14f1b4e0 100644 --- a/documentation/functions/domain/SOA.md +++ b/documentation/functions/domain/SOA.md @@ -24,7 +24,7 @@ parameter_types: {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("DNS_BIND"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), SOA("@", "ns3.example.com.", "hostmaster@example.com", 3600, 600, 604800, 1440), ); ``` diff --git a/documentation/functions/domain/SRV.md b/documentation/functions/domain/SRV.md index a5ca0bb9d..b0c4c71b0 100644 --- a/documentation/functions/domain/SRV.md +++ b/documentation/functions/domain/SRV.md @@ -22,7 +22,7 @@ Priority, weight, and port are ints. {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("GCLOUD"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // Create SRV records for a a SIP service: // pr w port, target SRV("_sip._tcp", 10, 60, 5060, "bigbox.example.com."), diff --git a/documentation/functions/domain/TLSA.md b/documentation/functions/domain/TLSA.md index 00ae19913..8299cbd9f 100644 --- a/documentation/functions/domain/TLSA.md +++ b/documentation/functions/domain/TLSA.md @@ -24,7 +24,7 @@ Certificate is a hex string. {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("GCLOUD"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), // Create TLSA record for certificate used on TCP port 443 TLSA("_443._tcp", 3, 1, 1, "abcdef0"), ); diff --git a/documentation/functions/global/D.md b/documentation/functions/global/D.md index ec848dfa2..5df7a190a 100644 --- a/documentation/functions/global/D.md +++ b/documentation/functions/global/D.md @@ -23,11 +23,8 @@ Modifier arguments are processed according to type as follows: {% code title="dnsconfig.js" %} ```javascript -var REG_NAMECOM = NewRegistrar("name.com"); -var r53 = NewDnsProvider("R53"); - // simple domain -D("example.com", REG_NAMECOM, DnsProvider(r53), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4"), CNAME("test", "foo.example2.com.") ); @@ -41,7 +38,7 @@ var GOOGLE_APPS_DOMAIN_MX = [ MX("@", 10, "alt4.aspmx.l.google.com."), ] -D("example.com", REG_MY_PROVIDER, DnsProvider(r53), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4"), CNAME("test", "foo.example2.com."), GOOGLE_APPS_DOMAIN_MX diff --git a/documentation/functions/global/DEFAULTS.md b/documentation/functions/global/DEFAULTS.md index 415a4ba2c..aac34f631 100644 --- a/documentation/functions/global/DEFAULTS.md +++ b/documentation/functions/global/DEFAULTS.md @@ -22,9 +22,7 @@ DEFAULTS( DefaultTTL("1d") ); -D("example.com", - REGISTRAR, - DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4") ); ``` @@ -37,9 +35,7 @@ The domain `example2.com` will **not** have the defaults set. ```javascript DEFAULTS(); -D("example2.com", - REGISTRAR, - DnsProvider("R53"), +D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), A("@","1.2.3.4") ); ``` diff --git a/documentation/functions/global/DOMAIN_ELSEWHERE.md b/documentation/functions/global/DOMAIN_ELSEWHERE.md index bfcb367f9..2f6d0ed4e 100644 --- a/documentation/functions/global/DOMAIN_ELSEWHERE.md +++ b/documentation/functions/global/DOMAIN_ELSEWHERE.md @@ -25,13 +25,13 @@ For example these two statements are equivalent: {% code title="dnsconfig.js" %} ```javascript -DOMAIN_ELSEWHERE("example.com", REG_NAMEDOTCOM, ["ns1.foo.com", "ns2.foo.com"]); +DOMAIN_ELSEWHERE("example.com", REG_MY_PROVIDER, ["ns1.foo.com", "ns2.foo.com"]); ``` {% endcode %} {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_NAMEDOTCOM, +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE, NAMESERVER("ns1.foo.com"), NAMESERVER("ns2.foo.com") diff --git a/documentation/functions/global/FETCH.md b/documentation/functions/global/FETCH.md index e8204903c..eab3e82ae 100644 --- a/documentation/functions/global/FETCH.md +++ b/documentation/functions/global/FETCH.md @@ -22,10 +22,7 @@ Otherwise the syntax of `FETCH` is the same as `fetch`. {% code title="dnsconfig.js" %} ```javascript -var REG_NONE = NewRegistrar("none"); -var DNS_BIND = NewDnsProvider("bind"); - -D("example.com", REG_NONE, DnsProvider(DNS_BIND), [ +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), [ A("@", "1.2.3.4"), ]); diff --git a/documentation/functions/global/REV.md b/documentation/functions/global/REV.md index a185cceeb..5bc12c201 100644 --- a/documentation/functions/global/REV.md +++ b/documentation/functions/global/REV.md @@ -8,8 +8,8 @@ ts_return: string --- `REV` returns the reverse lookup domain for an IP network. For -example `REV('1.2.3.0/24')` returns `3.2.1.in-addr.arpa.` and -`REV('2001:db8:302::/48)` returns `2.0.3.0.8.b.d.0.1.0.0.2.ip6.arpa.`. +example `REV("1.2.3.0/24")` returns `3.2.1.in-addr.arpa.` and +`REV("2001:db8:302::/48")` returns `2.0.3.0.8.b.d.0.1.0.0.2.ip6.arpa.`. This is used in [`D()`](D.md) functions to create reverse DNS lookup zones. This is a convenience function. You could specify `D("3.2.1.in-addr.arpa", diff --git a/documentation/functions/global/require.md b/documentation/functions/global/require.md index 202a9eb63..07e93fba6 100644 --- a/documentation/functions/global/require.md +++ b/documentation/functions/global/require.md @@ -23,7 +23,7 @@ of the call. ```javascript require("kubernetes/clusters.js"); -D("example.com", REG_MY_PROVIDER, PROVIDER, +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), IncludeKubernetes() ); ``` diff --git a/documentation/functions/record/TTL.md b/documentation/functions/record/TTL.md index b6492fa5f..e51699bd2 100644 --- a/documentation/functions/record/TTL.md +++ b/documentation/functions/record/TTL.md @@ -26,7 +26,7 @@ The value can be: {% code title="dnsconfig.js" %} ```javascript -D("example.com", REG_MY_PROVIDER, DnsProvider("R53"), +D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), DefaultTTL(2000), A("@","1.2.3.4"), // uses default A("foo", "2.3.4.5", TTL(500)), // overrides default diff --git a/documentation/getting-started.md b/documentation/getting-started.md index 038d5ac78..cb84c2c47 100644 --- a/documentation/getting-started.md +++ b/documentation/getting-started.md @@ -249,7 +249,7 @@ Done. 1 corrections. ## 6. Make a change Try making a change to `dnsconfig.js`. For example, change the IP -address of in `A('@', '1.2.3.4')` or add an additional A record. +address of in `A("@", "1.2.3.4")` or add an additional A record. In our case, we changed the IP address to 10.10.10.10. Previewing our change looks like this: