0

How can the TTL of current records in Google Cloud DNS be changed? The TTL of the zone can be changed through the gcloud dns records --zone=zone edit command, by changing the ttl without adding any records. For existing records, do we need to delete then re-add them?

user1591276
  • 183
  • 1
  • 11

2 Answers2

1

To edit an existing record, you are correct that you delete the existing record and add the updated version. See the example in the documentation here: https://cloud.google.com/dns/records/#creating_editing_and_deleting_records

If you want to edit another record, put it in the 'deletions' list. Also put it in the 'additions' list and update the TTL there.

Alyssa Pittman
  • 208
  • 1
  • 3
0

Although it might be implied, you can simply use gcloud dns record-sets export, then make substitutions in the exported file, and thereafter simply use gcloud dns record-sets import with the flag --delete-all-existing to update your zone. That flag might seem drastic, but it is pretty straight forward.

Bugs
  • 4,491
  • 9
  • 32
  • 41
YaguraStation
  • 558
  • 2
  • 12