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!