dnscontrol/pkg/js/parse_tests/019-r53-alias.json
Brice Figureau 7b8d608019 ROUTE53: Support Route53's ALIAS record type (#239) (#301)
* Stable comparison of metadata (#239)

Iterating over a map in Go never produces twice the same ordering.
Thus when comparing two metadata map with more than one key, the
`differ` is always finding differences.

To properly compare records metadata, we need to iterate the maps
in a deterministic way.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>

* Support for Route53 ALIAS record type (#239)

Route53 ALIAS doesn't behave like a regular ALIAS, and is much more
limited as its target can only be some specific AWS resources or
another record in the same zone.

According to #239, this change adds a new directive R53_ALIAS which
implements this specific alias. This record type can only be used
with the Route53 provider.

This directive usage looks like this:
```js
D("example.com", REGISTRAR, DnsProvider("ROUTE53"),
R53_ALIAS("foo1", "A", "bar") // record in same zone
R53_ALIAS("foo2", "A",
  "blahblah.elasticloadbalancing.us-west-1.amazonaws.com",
   R53_ZONE('Z368ELLRRE2KJ0')) // ELB in us-west-1

```

Unfortunately, Route53 requires indicating the hosted zone id
where the target is defined (those are listed in AWS documentation,
see the R53_ALIAS documentation for links).
2018-01-16 05:53:12 -05:00

111 lines
No EOL
2.3 KiB
JSON

{
"registrars": [],
"dns_providers": [],
"domains": [
{
"name": "foo.com",
"registrar": "none",
"dnsProviders": {},
"records": [
{
"type": "R53_ALIAS",
"name": "mxtest",
"target": "foo.com.",
"r53_alias": {
"type": "MX"
}
},
{
"type": "R53_ALIAS",
"name": "atest",
"target": "foo.com.",
"r53_alias": {
"type": "A"
}
},
{
"type": "R53_ALIAS",
"name": "atest",
"target": "foo.com.",
"r53_alias": {
"type": "A",
"zone_id": "Z2FTEDLFRTF"
}
},
{
"type": "R53_ALIAS",
"name": "aaaatest",
"target": "foo.com.",
"r53_alias": {
"type": "AAAA"
}
},
{
"type": "R53_ALIAS",
"name": "aaaatest",
"target": "foo.com.",
"r53_alias": {
"type": "AAAA",
"zone_id": "ERERTFGFGF"
}
},
{
"type": "R53_ALIAS",
"name": "cnametest",
"target": "foo.com.",
"r53_alias": {
"type": "CNAME"
}
},
{
"type": "R53_ALIAS",
"name": "ptrtest",
"target": "foo.com.",
"r53_alias": {
"type": "PTR"
}
},
{
"type": "R53_ALIAS",
"name": "txttest",
"target": "foo.com.",
"r53_alias": {
"type": "TXT"
}
},
{
"type": "R53_ALIAS",
"name": "srvtest",
"target": "foo.com.",
"r53_alias": {
"type": "SRV"
}
},
{
"type": "R53_ALIAS",
"name": "spftest",
"target": "foo.com.",
"r53_alias": {
"type": "SPF"
}
},
{
"type": "R53_ALIAS",
"name": "caatest",
"target": "foo.com.",
"r53_alias": {
"type": "CAA"
}
},
{
"type": "R53_ALIAS",
"name": "naptrtest",
"target": "foo.com.",
"r53_alias": {
"type": "NAPTR"
}
}
]
}
]
}