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

Octodns-sync support sync without override the dynamic records #424

Open
chakri-pd opened this issue Nov 20, 2019 · 3 comments
Open

Octodns-sync support sync without override the dynamic records #424

chakri-pd opened this issue Nov 20, 2019 · 3 comments

Comments

@chakri-pd
Copy link

@chakri-pd chakri-pd commented Nov 20, 2019

We have a usercase where dynamic records get create/delete through TF or ruby/python r53 api's when we provision and tear down the resources. In the same zone, we have some static records requests that come through from support where we are trying to streamline using octodns and git for version control.
One way to achieve would be to take octodns-dump and make necessary changes push to git and sync. Still, we may see some dynamic records that may get-in in the meantime. So one thought would be something like
octodns-sync --config-file=./config/production.yaml --no-delete

A flag that can override only the records that it finds in its .yaml and ignore the rest of the records.
any thoughts, please share.

@brianeclow
Copy link
Contributor

@brianeclow brianeclow commented Nov 20, 2019

The easiest way I found is to octodns-dump the record set down, then update with excluded. Or just create excluded records that match pattern. Something like:

---
? ''
: - octodns:
      excluded:
      - provider
    ttl: 60
    type: A
    values:
    - 192.168.1.2
    - 192.168.50.50
  - type: MX
    values:
    - exchange: mx.example.com.
      preference: 10
www:
  octodns:
    excluded:
    - provider
  type: CNAME
  value: magic.dynamic.endpoint.com.
@chakri-pd
Copy link
Author

@chakri-pd chakri-pd commented Nov 20, 2019

@brianeclow Thank you.
exclude multiple records using pattern matching interests me. However, it does not solve our use case.
Incrementally, I would like to run octodns-sync and sync only the records that were updated in YAML.
In other words, I would like to see an option in octodns that can sync at record level rather than complete zone level.

@ross
Copy link
Contributor

@ross ross commented Nov 20, 2019

In other words, I would like to see an option in octodns that can sync at record level rather than complete zone level.

This isn't possible with octoDNS as it's designed to work without any extra metadata so it wouldn't be able to know which records it owns (and needs to manage including deletes) and which records it would need to leave alone.

The recommendation from @brianeclow is the best option I can think of us as well. If you dump the full zone and then go through and exclude the things you don't want it to touch seems like it'll get the desired behavior.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.