3

I'm getting an error 'bad request' from Google Cloud DNS service. Maybe I'm doing something wrong? Thanks for your help.

gcloud dns managed-zone create --dns_name="archiver.photo" --description="Waitman Gobble's Archiver.Photo zone" archiverphoto

 Creating {'dnsName': 'archiver.photo', 'name': 'archiverphoto', 
'description': "Waitman Gobble's Archiver.Photo zone"} in 


Do you want to continue (Y/n)?  y

ERROR: (gcloud.dns.managed-zone.create) ResponseError: status=400, code=Bad Request, reason(s)=invalid
message=Invalid value for 'entity.managedZone.dnsName': 'archiver.photo'

$ whois archiver.photo

Domain Name: archiver.photo
Domain ID: DO_a14a5650944dd1238389653549ede7b5-UR
Updated Date: 2014-11-08T17:07:18.490Z
Creation Date: 2014-11-08T17:07:17.328Z
Registry Expiry Date: 2015-11-08T17:07:17.328Z
Registrant ID: tudgwdzl9bhpmwey
Registrant Name: Waitman Gobble
Registrant Organization: Waitman Gobble
waitman
  • 33
  • 6

1 Answers1

9

You forgot a period at the end of your dns name. It should be:

gcloud dns managed-zone create \
    --dns_name="archiver.photo." \
    --description="Waitman Gobble's Archiver.Photo zone" \
    archiverphoto
Robert
  • 6,412
  • 3
  • 24
  • 26
Thien Hoang
  • 331
  • 2
  • 4
  • 1
    A very interesting thing, if you do it from the web UI you can also omit the dot but when you click on equivalent on the command line, it adds the dot to the command – Giuseppe Borgese Aug 24 '22 at 12:57
  • Just for the record, the same happens with the Terraform resource google_dns_managed_zone – froblesmartin Feb 21 '23 at 20:51