Closed barnumbirr closed 7 months ago
The multi-type setup is an array of record details, each starting with the -
so the octodns
bit needs to live under the one of those you'd like it to apply to, something like:
www:
- octodns:
cloudflare:
proxied: true
auto-ttl: true
type: A
value: 213.186.33.5
- type: TXT
value: "4|https://example.de"
There's a lot to not like about YAML, it's the best of not great options, but arrays are probably my least favorite and regardless is the most non-obvious.
Ah, I see. I'd like the octodns
bit to apply to both records so I ended up doing something like this:
www:
- octodns:
cloudflare:
proxied: true
auto-ttl: true
type: A
value: 213.186.33.5
- octodns:
cloudflare:
proxied: true
auto-ttl: true
type: TXT
value: "4|https://example.de"
I would say that this all makes sense in my head now but that would be a lie. The joys of YAML... 😏 Thanks for your help!
For bonus points/if you're going to be using that block a lot you can utilize YAML anchors to avoid some duplication, haven't tested it, but I think this should work.
www:
- octodns: &SHARED_OCTODNS
cloudflare:
proxied: true
auto-ttl: true
type: A
value: 213.186.33.5
- octodns: *SHARED_OCTODNS
type: TXT
value: "4|https://example.de"
There's a bit more detail and description in the basic example https://github.com/octodns/octodns/blob/main/examples/basic/config/my-domain.com.yaml
Thanks, it works.
Also, my mind is blown as I had no idea YAML anchors were a thing in octodns
.
Also, my mind is blown as I had no idea YAML anchors were a thing in
octodns
They're actually part of the YAML standard and supported by pyyaml. The rabbit hole goes much much deeper, but that's kind of where I stop with things as they quickly get more complicated/confusing than useful.
Hi,
I have the following www subdomain record
Using the latest (
v0.0.4
) version of octodns-cloudflare, I'd like proxy and setauto-ttl
for thewww
subdomain as followshowever this results in the following stacktrace:
Is there now way to manage a subdomain with multiple entries while using proxy?