Diagram
A five-step flow showing custom metadata and startup script attached at creation, read during boot, then executed to configure the instance, repeating on every start and reboot.
Automating Initialization with Metadata and Startup Scripts
Automating Initialization with Metadata and Startup Scripts provides stored data and automatic actions that configure a Compute Engine instance each time it boots. Custom metadata stores unique key-value information about the instance, such as environment names or configuration flags, that software on the instance can read. A startup script is automation that runs commands to install packages, write files, or enforce security settings.
The two options differ in what they hold and when they apply:
| Option | What it stores or does | When it applies |
|---|---|---|
| Custom metadata | Stores unique key-value information about the instance | Available to the instance during runtime |
| Startup script | Runs commands to initialize or harden the instance | Runs on every start and every reboot |
Domain 2 of 11
24 practice questions
Practice this DomainLast updated