Google Cloud Professional Cloud Developer — Question 49
Your application is built as a custom machine image. You have multiple unique deployments of the machine image. Each deployment is a separate managed instance group with its own template. Each deployment requires a unique set of configuration values. You want to provide these unique values to each deployment but use the same custom machine image in all deployments. You want to use out-of-the-box features of Compute Engine.
What should you do?
Answer options
- A. Place the unique configuration values in the persistent disk.
- B. Place the unique configuration values in a Cloud Bigtable table.
- C. Place the unique configuration values in the instance template startup script.
- D. Place the unique configuration values in the instance template instance metadata.
Correct answer: D
Explanation
The correct answer is D because instance metadata is specifically designed to pass configuration values to instances at startup, making it ideal for this scenario. Options A and B do not provide a direct and efficient means to configure instances at launch, while option C may not be as flexible or straightforward as using instance metadata.