1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

ROUTE53: fix R53_ZONE() handling for domains (#2306)

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
Tom Limoncelli
2023-05-02 13:04:59 -04:00
committed by GitHub
parent 49e9279388
commit 489be2e3dc
52 changed files with 151 additions and 89 deletions

View File

@@ -90,8 +90,8 @@ file name is the name as specified in the `D()` function plus ".zone".
The filenameformat is a string with a few printf-like `%` verbs:
* `%U` the domain name as specified in `D()`
* `%D` the domain name without any split horizon tag
* `%T` the split horizon tag, or "", see `D()`
* `%D` the domain name without any split horizon tag (the "example.com" part of "example.com!tag")
* `%T` the split horizon tag, or "" (the "tag" part of "example.com!tag")
* `%?x` this returns `x` if the split horizon tag is non-null, otherwise nothing. `x` can be any printable.
* `%%` `%`
* ordinary characters (not `%`) are copied unchanged to the output stream
@@ -111,7 +111,7 @@ Typical values:
The last example will generate the same name for both
`D("example.tld!inside")` and `D("example.tld!outside")`. This
assumes two BIND providers are configured in `creds.json`, eacch with
assumes two BIND providers are configured in `creds.json`, each with
a different `directory` setting. Otherwise `dnscontrol` will write
both domains to the same file, flapping between the two back and
forth.

View File

@@ -78,6 +78,30 @@ D("example.tld", REG_NONE, DnsProvider(DSP_R53),
```
{% endcode %}
## Split horizon
This provider supports spilt horizons using the `R53_ZONE()` domain function.
In this example the domain `testzone.net` appears in the same account twice,
each with different zone IDs specified using `R53_ZONE()`.
```
var DSP_R53 = NewDnsProvider("r53_main");
var REG_NONE = NewRegistrar("none");
D('testzone.net!private', REG_NONE,
DnsProvider(DSP_R53),
R53_ZONE('Z111111111JCCCP1V7UW'),
TXT('me', 'private testzone.net'),
);
D('testzone.net!public', REG_NONE,
DnsProvider(DSP_R53),
R53_ZONE('Z222222222INNG98SHJQ2'),
TXT('me', 'public testzone.net'),
);
```
## Activation
DNSControl depends on a standard [AWS access key](https://aws.amazon.com/developers/access-keys/) with permission to list, create and update hosted zones. If you do not have the permissions required you will receive the following error message `Check your credentials, your not authorized to perform actions on Route 53 AWS Service`.