You add a startup script to a Google Compute Engine VM instance metadata to install software on boot. When exactly does this script run?
Think about when startup scripts are designed to automate setup.
Startup scripts run every time the VM boots or restarts, ensuring the setup steps are applied on each boot.
Which metadata key must you use to add a startup script that runs on a Google Compute Engine VM instance?
Check the official GCP documentation for the exact metadata key name.
The correct metadata key for startup scripts on GCP VM instances is 'startup-script'.
What is a major security risk when using startup scripts on GCP VM instances?
Consider what happens if secrets are stored directly in scripts.
Storing secrets like passwords or API keys in plain text inside startup scripts can expose them to anyone with access to the metadata or VM.
You want to ensure a custom monitoring agent is installed and running on all new VM instances automatically. Which approach best uses startup scripts for this?
Think about automating installation at boot time without manual steps.
Startup scripts automate installation and startup of software on every boot, ensuring consistency across VMs.
If a startup script on a GCP VM instance fails during execution, what is the effect on the VM's boot process?
Consider how startup scripts relate to the VM's core boot process.
Startup scripts run after the VM boots; failure in the script does not prevent the VM from booting.