Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are creating a new Windows Server virtual machine (VM) instance on Google Compute Engine using the Google Cloud CLI (gcloud). You want to automatically install the SSH package and enable SSH access for the VM during its initial provisioning.
Which parameter configuration should you include in the gcloud compute instances create command?
--shielded-secure-boot flag and set a custom resource tag named ssh-enabled=trueShielded VM features provide verifiable integrity controls, such as Secure Boot, Virtual Trusted Platform Module (vTPM), and integrity monitoring, to protect against boot-level or kernel-level malware. Network tags and resource tags are used for applying VPC firewall rules, routing policies, or organizational access controls.
The objective was to ensure boot integrity against unauthorized kernel modifications and to target firewall rules toward specific instances using network tags.
--metadata flag with sysprep-specialize-script-cmd to install google-compute-engine-ssh and enable-windows-ssh=TRUEIn Google Compute Engine, custom metadata key-value pairs allow you to pass startup scripts and configuration flags directly to instances during initialization. For Windows Server VMs, specialized metadata keys such as sysprep-specialize-script-cmd run commands during the Sysprep specialization phase of deployment, enabling automated package installation and system configuration before the VM becomes accessible.

sysprep-specialize-script-cmd key instructs the Windows deployment process to execute package manager commands (such as googet -noconfirm=true install google-compute-engine-ssh), ensuring the necessary OpenSSH components are installed automatically at launch.enable-windows-ssh=TRUE in the instance metadata informs the Google Compute Engine guest environment to configure Windows firewall rules and user permissions required for SSH connections.gcloud compute instances create scripts, deployment templates, or CI/CD pipelines.Using instance metadata for automated initialization leverages native Compute Engine guest agent capabilities. It configures the VM securely during its creation phase without requiring interactive RDP access or post-deployment manual configuration.
--metadata flag with serial-port-enable=TRUE and attach an SSH public key directly in the instance labelsThe serial-port-enable metadata key controls interactive serial console access to an instance, which is typically used for low-level debugging and recovery when standard networking is unavailable. Labels in Google Cloud are key-value pairs used solely for organizing, filtering, and grouping resources for billing and inventory management.
google-compute-engine-ssh package on Windows, nor does it enable the OpenSSH service daemon.You needed out-of-band console access to troubleshoot an unreachable instance whose network interface or boot configuration had failed.
To manage SSH keys, administrators must use project-wide metadata or instance metadata keys (ssh-keys), not resource labels.
roles/owner permissions during creationA service account provides an identity that applications running on Compute Engine instances use to authenticate to Google Cloud APIs. IAM roles grant that identity specific cloud-level permissions across Google Cloud resources.
google-compute-engine-ssh) or start SSH daemons on Windows.roles/owner gives excessive permissions over the entire cloud project, posing a severe security risk while failing to solve OS-level access requirements.Your workload on the VM required programmatic authorization to read and write cloud resources across your Google Cloud project using short-lived OAuth tokens.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated