Question

Difficulty: HardDeploying and Managing Compute Engine Virtual Machines

A cloud systems engineer is deploying a non-fault-tolerant telemetry processing application onto a Google Compute Engine VM named `telemetry-node-01` in the `europe-west3-a` zone. The VM requires a dedicated user-managed service account `[email protected]` for identity authorization, must attach an existing persistent disk named `log-archive-disk` in read-only mode to prevent data corruption, and must not be assigned a public external IP address. Which `gcloud` command correctly provisions this Compute Engine virtual machine instance according to these requirements?

  1. gcloud compute instances create telemetry-node-01 --zone=europe-west3-a [email protected] --no-address --disk=name=log-archive-disk,mode=roAnswer
  2. B
    gcloud compute instances create telemetry-node-01 --zone=europe-west3-a [email protected] --no-address --disk=name=log-archive-disk,mode=ro
  3. C
    gcloud compute instances create telemetry-node-01 --zone=europe-west3-a [email protected] --no-external-ip --provisioning-model=SPOT --disk=name=log-archive-disk,mode=ro
  4. D
    gcloud compute instances create telemetry-node-01 --zone=europe-west3-a --scopes=cloud-platform --no-address --disk=name=log-archive-disk,mode=ro

Answer

The correct command is `gcloud compute instances create telemetry-node-01 --zone=europe-west3-a [email protected] --no-address --disk=name=log-archive-disk,mode=ro`.
The command correctly uses `--service-account` to assign the user-managed service account identity, `--no-address` to omit an external IP address, and `--disk=name=log-archive-disk,mode=ro` to attach the existing persistent disk in read-only mode while maintaining standard provisioning for a non-fault-tolerant process.

Step-by-Step Solution

1
Identify the proper service account attachment flag
Use `[email protected]` to attach the custom service account identity.
The `--scopes` flag specifies API permission aliases/URIs, whereas `--service-account` sets the identity of the VM instance.
2
Identify the network interface configuration flag for disabling external IP addresses
Use `--no-address`.
In `gcloud compute instances create`, `--no-address` explicitly prevents the creation of an ephemeral or static external IP address on the default network interface.
3
Identify persistent disk attachment flags and workload suitability criteria
Use `--disk=name=log-archive-disk,mode=ro` and avoid Spot instance provisioning.
Specifying `mode=ro` mounts the existing disk as read-only. Standard provisioning must be used instead of Spot/Preemptible VMs because the workload is non-fault-tolerant.

Key Concept

Provisioning Compute Engine instances using gcloud CLI with custom service accounts, private networking, and attached persistent disks
Rate this question