1 Answers
From within a GCE instance, you can always query its metadata by sending HTTP request to http://metadata.google.internal
or using pre-installed gcloud
command, then passing the result to something like variable environments which startup script will interpret and process accordingly, or feeding those metadata as arguments for startup script. This is however feasible only if you have a uniform requirement of steps that you want those instances to perform (i.e. they have somewhat (almost) the same startup script, only parameters are different).
In case each individual instance need to perform a different set of actions, then the solution won’t work.
IMO, the question was asking about a specific case, but perhaps its wording is not clear enough and make learners confusing.
Some of the question texts also confused me (English is not my main language) but I also believe we need to keep it logical and simple. Real test questions will be clearer and follow/think about the data flow technique will help.