saltstack-formulas / bind-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
29 stars 117 forks source link

Impossible to set TTL on individual records #123

Open morgana2313 opened 5 years ago

morgana2313 commented 5 years ago

It seems impossible with this bind formula to set a TTL on individual records that differs from the TTL set in the soa data structure.

$TTL 1w ; default for the rest of the zone. 
foo         IN      A      192.168.254.3  ; uses default of 1w

$TTL 2d ; default for the rest of the zone. 
joe   3h   IN      A      192.168.254.3  ; overrides default     
www        IN      A      192.168.254.3  ; uses default = 2 days

Changing the default for the rest of the zone may nog be very practical with the current set up that sorts the entries on record type and alphabetically, but the override per record should be possible?

braunsonm commented 2 years ago

Late to needing this but it isn't impossible, you can do this:

records:
  '30m A':
    example: 1.1.1.1

Which will set the TTL for example to 30 minutes. I agree it would be nice to have a better solution for this