Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record attributes support #135

Open
markrity opened this issue Mar 30, 2025 · 2 comments
Open

Record attributes support #135

markrity opened this issue Mar 30, 2025 · 2 comments

Comments

@markrity
Copy link

markrity commented Mar 30, 2025

Hi all,
I’ve noticed that Cloudflare supports DNS Record Attributes (e.g., priority, proxied, and other metadata) when creating or updating DNS records, as shown in Cloudflare’s API documentation.

Currently, it appears that these attributes aren’t supported in this provider/plugin. I’m wondering if this is a feature that aligns with the project’s overall needs and goals, especially since not all DNS providers support attributes or comments in the same way.

I’d be happy to help implement or contribute a PR for this functionality if there’s general interest or consensus on how it should be handled. Let me know what you think!

Thanks!

@ross
Copy link
Contributor

ross commented Mar 30, 2025

Afaik all of those things are currently supported, through not well documented, e.g.

def set_record_proxied_flag(record, proxied):
try:
record._octodns['cloudflare']['proxied'] = proxied
except KeyError:
record._octodns['cloudflare'] = {'proxied': proxied}
return record
def set_record_auto_ttl_flag(record, auto_ttl):
try:
record._octodns['cloudflare']['auto-ttl'] = auto_ttl
except KeyError:
record._octodns['cloudflare'] = {'auto-ttl': auto_ttl}
return record
def set_record_comment(record, comment):
try:
record._octodns['cloudflare']['comment'] = comment
except KeyError:
record._octodns['cloudflare'] = {'comment': comment}
return record
def set_record_tags(record, tags):
try:
record._octodns['cloudflare']['tags'] = tags
except KeyError:
record._octodns['cloudflare'] = {'tags': tags}
return record

This record wouldn't make any sense, but this is an example of how they're used.

www:
    octodns:
        cloudflare:
            auto-ttl: True
            comment: hello world
            proxied: True
            tags:
                - one
                - two

@ross
Copy link
Contributor

ross commented Mar 30, 2025

Looks like at least the auto-ttl and proxied bits are mentioned in the README https://github.com/octodns/octodns-cloudflare/blob/main/README.md#configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants