octodns / octodns-cloudflare

Cloudflare DNS provider for octoDNS
MIT License
25 stars 18 forks source link

octodns-dump does not print cloud flare proxy flag #8

Closed parkr closed 2 years ago

parkr commented 6 years ago

Hey!

This is a follow-up to https://github.com/github/octodns/pull/264 by @begincalendar.

My dns records can be found at parkr/dns. In that repo, I have a script called script/dump which I use to dump new zones when I create them. I upgraded to octodns 0.9.3 and re-ran script/dump hoping to see the new proxied field in my config files. Alas, my YAML output was unchanged.

Is it possible to add this provider-specific flag to octodns-dump?

Here's my incantation:

for zone in "${ZONES[@]}"; do
    echo "Processing zone $zone."
    ./vendor/bin/octodns-dump \
      --config-file config/production.yaml \
      --output-dir config \
      "$zone." cloudflare \
      "$@"
done

(Also, I tried doing octodns-dump --version, and it would have no part of it. Think we could add a global --version flag to make checking versions easier?)

begincalendar commented 6 years ago

@ross Would something like this cause any issues:

diff --git octodns/provider/yaml.py octodns/provider/yaml.py
index 287fd3b..176cf42 100644
--- octodns/provider/yaml.py
+++ octodns/provider/yaml.py
@@ -86,6 +86,8 @@ class YamlProvider(BaseProvider):
         for record in records:
             d = record.data
             d['type'] = record._type
+            if record._octodns:
+                d['octodns'] = record._octodns
             if record.ttl == self.default_ttl:
                 # ttl is the default, we don't need to store it
                 del d['ttl']

?

ross commented 6 years ago

@ross Would something like this cause any issues:

@begincalendar yeah that looks like the right approach. Feel free to PR something down that path.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

parkr commented 2 years ago

@ross does cloudflare dump still not preserve the Proxied flag? I can try soon if you don't know off hand.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

parkr commented 2 years ago

Closed by https://github.com/octodns/octodns/pull/293.

https://github.com/octodns/octodns/blob/c80a93a29604949c4d5c7ce8795830591a144b69/octodns/provider/yaml.py#L236-L237

https://github.com/octodns/octodns/commit/933a56d8f982d408bc394ec761cd019d2a57d34a