I have several Google Compute Engine instances, and have set instance metadata on each, under the assumption these are available on the instance itself as an environment variabl
It may be worth studying Metadata querying a bit more, but my guess is that you are attempting to get custom metadata, which is resulting in it not being found. Make sure you are using the attributes
directory to access any custom metadata.
For example, this will get the built-in tags
metadata:
curl "http://metadata.google.internal/computeMetadata/v1/instance/tags" \
-H "Metadata-Flavor: Google"
while this will get your custom metadata for attribute foo
:
curl "http://metadata.google.internal/computeMetadata/v1//attributes/foo" \
-H "Metadata-Flavor: Google"