dnscontrol/pkg/js/parse_tests/036-dextendcf.json
Tom Limoncelli 0ae4acc3e4
BUGFIX: BIND %D not working after v4.28.0 (#3900)
# Issue

Fixes https://github.com/StackExchange/dnscontrol/issues/3898

After the v4.28.0 upgrade, the `%D` option in BIND's `"filenameformat"`
option no longer works (returns "") when reading the zonefile (but it
works for writing to one!). As a result, "push" always re-creates the
zonefile even if there are no changes.

# Resolution

Fix `%D` in the zone reading code.
2025-12-08 10:32:07 -05:00

101 lines
4 KiB
JSON

{
"dns_providers": [
{
"name": "Cloudflare",
"type": "CLOUDFLAREAPI"
}
],
"domains": [
{
"dnsProviders": {
"Cloudflare": -1
},
"meta": {
"dnscontrol_nameraw": "foo.com",
"dnscontrol_nameunicode": "foo.com",
"dnscontrol_uniquename": "foo.com"
},
"name": "foo.com",
"records": [
{
"filepos": "[line:11:5]",
"meta": {
"orig_custom_type": "CF_WORKER_ROUTE"
},
"name": "@",
"target": "test3.foo.com,test-worker",
"ttl": 300,
"type": "CF_WORKER_ROUTE"
},
{
"comparable": "name=(301,test1.foo.com,https://goo.com/$1) code=(301) when=(http.host eq \"test1.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))",
"fields": {
"code": 301,
"sr_display": "name=(301,test1.foo.com,https://goo.com/$1) code=(301) when=(http.host eq \"test1.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))",
"sr_name": "301,test1.foo.com,https://goo.com/$1",
"sr_then": "concat(\"https://goo.com\", http.request.uri.path)",
"sr_when": "http.host eq \"test1.foo.com\" and http.request.uri.path eq \"/\""
},
"filepos": "[line:9:5]",
"name": "@",
"name_raw": "@",
"name_unicode": "@",
"target": "name=(301,test1.foo.com,https://goo.com/$1) code=(301) when=(http.host eq \"test1.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))",
"ttl": 1,
"type": "CLOUDFLAREAPI_SINGLE_REDIRECT",
"zonfefilepartial": "name=(301,test1.foo.com,https://goo.com/$1) code=(301) when=(http.host eq \"test1.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))"
},
{
"comparable": "name=(302,test2.foo.com,https://goo.com/$1) code=(302) when=(http.host eq \"test2.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))",
"fields": {
"code": 302,
"sr_display": "name=(302,test2.foo.com,https://goo.com/$1) code=(302) when=(http.host eq \"test2.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))",
"sr_name": "302,test2.foo.com,https://goo.com/$1",
"sr_then": "concat(\"https://goo.com\", http.request.uri.path)",
"sr_when": "http.host eq \"test2.foo.com\" and http.request.uri.path eq \"/\""
},
"filepos": "[line:10:5]",
"name": "@",
"name_raw": "@",
"name_unicode": "@",
"target": "name=(302,test2.foo.com,https://goo.com/$1) code=(302) when=(http.host eq \"test2.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))",
"ttl": 1,
"type": "CLOUDFLAREAPI_SINGLE_REDIRECT",
"zonfefilepartial": "name=(302,test2.foo.com,https://goo.com/$1) code=(302) when=(http.host eq \"test2.foo.com\" and http.request.uri.path eq \"/\") then=(concat(\"https://goo.com\", http.request.uri.path))"
},
{
"filepos": "[line:6:5]",
"name": "test1.foo.com.sub",
"subdomain": "sub",
"target": "10.2.3.1",
"ttl": 300,
"type": "A"
},
{
"filepos": "[line:7:5]",
"name": "test2.foo.com.sub",
"subdomain": "sub",
"target": "10.2.3.2",
"ttl": 300,
"type": "A"
},
{
"filepos": "[line:8:5]",
"name": "test3.foo.com.sub",
"subdomain": "sub",
"target": "10.2.3.3",
"ttl": 300,
"type": "A"
}
],
"registrar": "Third-Party",
"uniquename": "foo.com"
}
],
"registrars": [
{
"name": "Third-Party",
"type": "NONE"
}
]
}