fix the error when retrieving the $REGION

This commit is contained in:
sophie
2024-07-17 14:45:08 +08:00
parent 8b92b87aa3
commit 339343b567

View File

@@ -64,7 +64,7 @@ INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" \
```
REGION=$(curl -s -H "Metadata-Flavor: Google" \
http://metadata.google.internal/computeMetadata/v1/project/attributes/google-compute-default-region)
> http://metadata.google.internal/computeMetadata/v1/instance/zone | awk -F/ '{print $4}' | sed 's/-[a-z]$//')
```
```