Removing DNS entries with gcloud -


adding dns record gcloud good

gcloud dns record-sets transaction start -z my-zone gcloud dns record-sets transaction add -z my-zone --name "some_domain.com" --ttl 0 --type txt "test" gcloud dns record-sets transaction execute -z my-zone 

but when try remove entry

gcloud dns record-sets transaction start -z my-zone gcloud dns record-sets transaction remove -z my-zone --name "some_domain.com" --ttl 300 --type txt "test" gcloud dns record-sets transaction execute -z my-zone 

i error

error: (gcloud.dns.record-sets.transaction.remove) invalid value 'parameters.name': 'some_domain.com' (code: 400)

the dns zone file standard requires complete domain names end trailing '.' character. since common mistake, other gcloud dns ... commands automatically append trailing '.' domain names if user forgets add one. however, particular command not seem doing that. fixed soon.

meanwhile, workaround it, need add trailing '.' in domain name. so:

gcloud dns record-sets transaction remove -z my-zone --name "some_domain.com." --ttl 300 --type txt "test" 

alternatively, can use import/export follows:

gcloud dns record-sets export -z my-zone records-file 

edit records-file remove records not need. then:

gcloud dns record-sets import -z my-zone --delete-all-existing records-file 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -