Google Associate Cloud EngineerEnsuring successful operation of a cloud solutionEasy
A company requires all new Compute Engine instances to be created with a specific set of security hardening configurations, such as disabled SSH password authentication and specific firewall tags. They want to ensure consistency and prevent misconfigurations across all deployments. Which resource should they define and use?
- AStartup Script
- BInstance Template
- CDeployment Manager Template
- DCustom Machine Image
Show answer & explanationAnswer & explanation
Correct answer: B. Instance Template
An Instance Template defines the machine type, boot disk image, network settings, and other instance properties. It ensures that all Compute Engine instances created from it have consistent configurations, including security hardening and firewall tags.
Why the other options are wrong
- A. A Startup Script runs once when an instance starts but is not a declarative way to define the instance's core configuration or network properties like firewall tags; it's typically used to install software or configure services post-boot.
- C. Deployment Manager Template is used for declaring and deploying entire Google Cloud infrastructure, but the specific resource to define a VM's configuration for consistency is an Instance Template, which would be referenced within a Deployment Manager template.
- D. A Custom Machine Image provides a pre-configured boot disk, but it doesn't define network settings like firewall tags or all instance properties; it's part of an instance template.
Instance Template
A global resource in Google Cloud that defines the configuration for Compute Engine instances, including machine type, boot disk, network, and other properties.
- Ensures consistent VM deployments
- Used by Managed Instance Groups (MIGs)
- Can include boot disk image, machine type, network, metadata, firewall tags
- Does not create instances itself, but defines how they are created
Memory trick: Instance Template: The blueprint for your perfect VM.