Every GCP virtual machine (VM) instance stores its metadata on a metadata server. VM's automatically has access to the metadata server API without any additional authorization. Metadata is stored as key:value pairs.
A startup script is a file that performs tasks during the startup process of a virtual machine (VM) instance. Startup scripts can apply to all VMs in a project or to a single VM.