A cloud engineer needs to deploy a Compute Engine virtual machine instance using a custom image stored in a central image repository project. The VM requires a reserved static internal IP address in a specific target subnet and must be assigned a custom service account. What is the correct sequence of steps to perform this deployment workflow?
- 1Grant the target project's Compute Engine Service Agent the `roles/compute.imageUser` role on the custom image in the central repository project.
- 2Reserve a static internal IP address in the target subnet using `gcloud compute addresses create`.
- 3Create the VM instance using `gcloud compute instances create` referencing the custom image URI, reserved static IP, target subnet, and custom service account.
- 4Verify the running status and network configuration of the VM using `gcloud compute instances describe`.
Cevap
The correct order of execution is: First, grant the target project service agent `roles/compute.imageUser` access on the central image. Second, reserve the static internal IP address in the target subnet. Third, execute `gcloud compute instances create` with the image URI, reserved internal IP, and custom service account. Fourth, verify the VM state and configuration using `gcloud compute instances describe`.
Cross-project image deployments require establishing IAM permissions prior to instance creation. Granting `roles/compute.imageUser` to the target project's Compute Engine Service Agent authorizes access to the custom image in the central project. Next, reserving the static internal IP in the target subnet ensures the network resource exists. Once these prerequisites are met, running `gcloud compute instances create` provisions the instance with the specified image, network IP, and service account. Finally, verifying with `gcloud compute instances describe` ensures proper deployment.
Adım Adım Çözüm
Anahtar Kavram
Cross-Project Image Provisioning and Static Network Allocation