0

When I try this command in Ubuntu Terminal:

gcloud dns record-sets update test.pixelcraftserver.net --rrdatas=<MyIPAddress> --type=A --zone=pixelcraft

It works perfectly fine, however in a bash script using multiple commands, it doesn't work at all giving this error:

Script:

IP_ADDR=$(curl ifconfig.me)
gcloud dns record-sets update other.pixelcraftserver.net --rrdatas=$IP_ADDR --type=A --zone=pixelcraft
gcloud dns record-sets update test.pixelcraftserver.net --rrdatas=$IP_ADDR --type=A --zone=pixelcraft
gcloud dns record-sets update main.pixelcraftserver.net --rrdatas=$IP_ADDR --type=A --zone=pixelcraft

Error:

' does not exist.s.record-sets.update) HTTPError 404: The 'parameters.managedZone' resource named 'pixelcraft
' does not exist.s.record-sets.update) HTTPError 404: The 'parameters.managedZone' resource named 'pixelcraft
' does not exist.s.record-sets.update) HTTPError 404: The 'parameters.managedZone' resource named 'pixelcraft

Any help on this matter would be appreciated, thanks!

Pixonepro
  • 13
  • 2
  • 1
    Can you try to add the parameter `--project=` to your commands? You might not load the command in the same context and you haven't the same exact parameters. – guillaume blaquiere Apr 19 '21 at 19:31
  • Another issue you will have is that you must start your update with `gcloud dns record-sets transaction start` and finish with `gcloud dns record-sets transaction execute`. – John Hanley Apr 29 '21 at 18:50

0 Answers0