Previous command returned 404

curl -s -H "Metadata-Flavor: Google" \
  http://metadata.google.internal/computeMetadata/v1/project/attributes/google-compute-default-region
pull/681/head
leandroid 2021-11-20 10:38:31 -08:00 committed by GitHub
parent 79a3f79b27
commit 3d69e2f514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -63,8 +63,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)
REGION=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone | cut -d/ -f 4 | sed 's/.\{2\}$//')
```
```