I have an existing, already configured VM on Google Cloud Platform. It was created without a startup script, but I\'d like to add one now.
How do I add it from the conso
The above answer is correct as per the question.
But what I was looking for to add multiple .sh scripts in startup metadata of GCP VM via gcloud command.
Below works for me (maybe it will help someone)
To add multiple key-value pairs at once, separate them with commas:
$ gcloud compute instances add-metadata test-instance \
--metadata=important-data="2 plus 2 equals\
4",unimportant-data=zero
Docs link- https://cloud.google.com/sdk/gcloud/reference/compute/instances/add-metadata