Question

Difficulty: HardManaging Compute Engine Resources

An enterprise database team plans to execute a long-running, non-fault-tolerant database schema migration on Google Cloud Compute Engine. The job requires 12 hours of uninterrupted processing and cannot withstand instance termination or preemption mid-execution. Additionally, administrative access for the operational team responsible for starting, stopping, and maintaining these instances must adhere strictly to the principle of least privilege. Which configuration strategy should the Cloud Engineer implement to meet these requirements following Google-recommended best practices?

  1. Provision the workload using standard (non-Spot) Compute Engine VM instances, and assign the administrative team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) on the target project.Answer
  2. B
    Provision the workload using Spot Compute Engine VM instances with automatic restart enabled, and assign the administrative team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) on the target project.
  3. C
    Provision the workload using standard (non-Spot) Compute Engine VM instances, and assign the administrative team the primitive Editor role (roles/editor) on the target project.
  4. D
    Provision the workload using Spot Compute Engine VM instances across multiple regions simultaneously to bypass regional quota limitations, and assign the administrative team the primitive Owner role (roles/owner).

Answer

Provision the workload using standard (non-Spot) Compute Engine VM instances, and assign the administrative team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) on the target project.
Standard Compute Engine VM instances guarantee uninterrupted execution required for non-fault-tolerant, long-running database migrations. Pairing standard instances with the predefined Compute Instance Admin (v1) role (`roles/compute.instanceAdmin.v1`) ensures that operators possess all necessary instance management permissions without exposing unrelated project services.

Step-by-Step Solution

1
Analyze workload tolerance for interruption.
Identified that the 12-hour database migration is non-fault-tolerant and cannot handle termination, ruling out Spot or Preemptible VMs.
Spot/Preemptible instances offer cost savings but carry a risk of preemption at any moment with only 30 seconds notification.
2
Determine instance lifecycle provision mode.
Select standard Compute Engine virtual machine instances to guarantee compute capacity and continuous runtime.
Standard instances guarantee process continuity without premature preemption.
3
Evaluate access control requirements based on least privilege.
Select predefined role `roles/compute.instanceAdmin.v1` instead of broad primitive roles like Editor or Owner.
Predefined Compute Engine roles restrict permissions specifically to Compute Engine resources, avoiding excessive permissions across other GCP services.

Key Concept

Compute Engine Lifecycle Management and IAM Least Privilege
Estimated Time:2m 0s
Rate this question