I'm testing google cloud dns, and tried to create TXT record using gcloud command. However, created record is unexpectedly escaped.
This is what I did:
% gcloud dns records --zone="myzonename" edit
In "additions" section, I added TXT record like this:
{
"kind": "dns#resourceRecordSet",
"name": "example.com.",
"rrdatas": [
"v=spf1 include:_spf.google.com ~all",
],
"ttl": 84600,
"type": "TXT"
},
gcloud command exited with no error, and TXT record was created in my zone. However, the created record looks like this:
{
"kind": "dns#resourceRecordSet",
"name": "example.com.",
"rrdatas": [
"\"v=spf1\" \"include:_spf.google.com\" \"~all\"",
],
"ttl": 84600,
"type": "TXT"
},
As you can see, double quotes are kept in data. I verified that response from DNS server also includes double quote and spaces.
% nslookup -type=TXT example.com. ns-cloud-e1.googledomains.com.
Server: ns-cloud-e1.googledomains.com.
Address: 216.239.32.110#53
example.com text = "v=spf1" "include:_spf.google.com" "~all"
Expected output is example.com text = "v=spf1 include:_spf.google.com ~all"
How can I stop this unnecessary escaping?