While creating a VM instance, I can add some (optionals) metadata that can be reached by doing:
curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/
On the other hand, we can also define sort of global metadata values on https://console.cloud.google.com/compute/metadata?project=xxx
, which can be reached by doing:
curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/attributes/
Obviously, the /project
one seems to be a global metadata shared for all the instances in the project, and the /instance
seems to be metadata attached only to the current instance. Besides that, is there any other difference?
I was doing the GCS & GCE Challenge Lab
and I set the metadata (the bucket name to storage the startup log) in the global metadata, due to I thought about that bucket as the global bucket to storage every log.
If we define that the created bucket is gonna be used in every single instance to log things, so, is it OK to define it as a global metadata for all the instances?
Thanks!