2 Answers
okay… just came across this and it worked.. if anyone wants to share their experience, please feel free to do so ..
In the Google Cloud Console, go to the VM instances page.
Go to VM instances
Click the instance to which you want to add a startup script.
On the instance details page, complete the following steps:
Click the Edit button.
Under Custom metadata, click Add item.
Add your startup script using one of the following keys:
startup-script: supply the startup script contents directly by using this key.
startup-script-url: supply a Cloud Storage URL to the start script file by using this key.
Thank you for sharing.
This is actually documented in the Google official documentation.
See below:
https://cloud.google.com/compute/docs/startupscript#startupscriptrunninginstances