GCP Associate Cloud Engineer Practice Question

Your security team must grant a freelance developer SSH access to a single Compute Engine VM for exactly 14 days. After that period the key must become invalid automatically, with no manual cleanup. Because multiple freelancers are onboarded every month, you also want to avoid editing project- or instance-level SSH key metadata each time. Which approach meets these requirements with the least operational effort?

  • Require the developer to connect through IAP TCP tunneling and manually remove the IAP TCP forwarding IAM role after 14 days.

  • Add the developer's public key to the VM's ssh-keys instance metadata with an expire-on timestamp set 14 days in the future.

  • Enable OS Login on the VM, grant the developer the Compute OS Login IAM role only on that VM, and have them upload their SSH public key with a 14-day TTL (for example, --ttl=1209600s) using gcloud compute os-login ssh-keys add.

  • Store the public key in Secret Manager and use a startup script on the VM to retrieve the key into ~/.ssh/authorized_keys; schedule a Cloud Scheduler job to disable the secret after 14 days.

GCP Associate Cloud Engineer
Planning and implementing a cloud solution
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot