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

list of TXT records with different TTL's? #406

Open
Moumoutaru opened this issue Sep 25, 2019 · 2 comments
Open

list of TXT records with different TTL's? #406

Moumoutaru opened this issue Sep 25, 2019 · 2 comments

Comments

@Moumoutaru
Copy link

@Moumoutaru Moumoutaru commented Sep 25, 2019

Does OctoDNS support having a list of TXT records with different TTLs?

Currently I am not able to do something like:

---
? ''
: - octodns:
      cloudflare:
        proxied: false
    ttl: 1
    type: A
    values:
    - 1.2.3.4
    - 5.6.7.8
    - 9.1.2.3
  - ttl: 1
    type: MX
    values:
    - exchange: mail1.mydomain.com.
      preference: 10
    - exchange: mail2.mydomain.com.
      preference: 15
  - ttl: 7200
    type: TXT
    values:
    - MS=ms11111111
    - v=spf1 include:_spf.mydomain.com include:servers.mcsv.net -all
  - ttl: 3600
    type: TXT
    values:
    - THING1=thing1
    - THING2=thing2

When doing the above I get:

Traceback (most recent call last):
  File "/srv/dns/env/bin/octodns-sync", line 11, in <module>
    sys.exit(main())
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/cmds/sync.py", line 39, in main
    dry_run=not args.doit, force=args.force)
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/manager.py", line 301, in sync
    plans = [p for f in futures for p in f.result()]
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/manager.py", line 56, in result
    return self.func(*self.args, **self.kwargs)
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/manager.py", line 224, in _populate_and_plan
    source.populate(zone)
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/provider/yaml.py", line 77, in populate
    self._populate_from_file(filename, zone, lenient)
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/provider/yaml.py", line 62, in _populate_from_file
    zone.add_record(record, lenient=lenient)
  File "/srv/dns/env/lib/python2.7/site-packages/octodns/zone.py", line 84, in add_record
    record._type))
octodns.zone.DuplicateRecordException: Duplicate record mydomain.com., type TXT
@ross
Copy link
Contributor

@ross ross commented Oct 3, 2019

Does OctoDNS support having a list of TXT records with different TTLs?

Not currently and tbh the schema/semantics wouldn't really support it very easily. I'm pretty sure that (at least) some providers wouldn't support it either. Many of them seem to accept a single object with a TTL and a list of values. Are you currently running things this way with a DNS provider currently? Which one(s)?

@Moumoutaru
Copy link
Author

@Moumoutaru Moumoutaru commented Oct 3, 2019

Currently with Cloudflare. It's only come up one time so it's likely not a big problem. We were able to manually add the record.

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
2 participants
You can’t perform that action at this time.