Skip to content

Commit b446d05

Browse files
committed
Deprecate X-Google-Metadata-Request in favor new Metadata-Flavor header
We are deprecating the use of the X-Google-Metadata-Request header in favor of the latest header, Metadata-Flavor. The transition is explained here: https://cloud.google.com/compute/docs/metadata#transitioning
1 parent b094eae commit b446d05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compute/api/startup-script.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ apt-get -y install imagemagick
2121
# Use the metadata server to get the configuration specified during
2222
# instance creation. Read more about metadata here:
2323
# https://cloud.google.com/compute/docs/metadata#querying
24-
IMAGE_URL=$(curl http://metadata/computeMetadata/v1/instance/attributes/url -H "X-Google-Metadata-Request: True")
25-
TEXT=$(curl http://metadata/computeMetadata/v1/instance/attributes/text -H "X-Google-Metadata-Request: True")
26-
CS_BUCKET=$(curl http://metadata/computeMetadata/v1/instance/attributes/bucket -H "X-Google-Metadata-Request: True")
24+
IMAGE_URL=$(curl http://metadata/computeMetadata/v1/instance/attributes/url -H "Metadata-Flavor: Google")
25+
TEXT=$(curl http://metadata/computeMetadata/v1/instance/attributes/text -H "Metadata-Flavor: Google")
26+
CS_BUCKET=$(curl http://metadata/computeMetadata/v1/instance/attributes/bucket -H "Metadata-Flavor: Google")
2727

2828
mkdir image-output
2929
cd image-output

0 commit comments

Comments
 (0)