Explore / Google Cloud Associate Cloud Engineer Exam Prep / Practice questions
Google Cloud Associate Cloud Engineer practice questions
10 questions from the bank behind this course's timed mock. Free to read and to answer, no account needed, and each has its answer and an explanation. They belong to Google Cloud Associate Cloud Engineer Exam Prep.
Answer them one at a time →Read lesson 1 free
Question 1
A data team runs a nightly batch job. If the job is interrupted, it can restart without causing problems. The team lead says the requirement is to run it in the most cost-effective way. Using the lesson's keyword-spotting rules, which option should you choose?
- Run the job on interruptible, pay-per-use capacity that is only billed while the job runs
- Run the job on reserved, dedicated capacity that is kept running between nightly runs
- Run the job on a self-managed VM cluster with custom scripts to scale it up and down
- Run the job on always-on VMs sized for peak load so it never runs short of resources
Show the answer
Answer: A. Run the job on interruptible, pay-per-use capacity that is only billed while the job runs
The words 'most cost-effective' point to pay-per-use or interruptible capacity, and this job can safely be interrupted. Always-on VMs sized for peak load would work technically, but they are over-provisioned, and the lesson says to rule out over-provisioned options when cost is the constraint.
Question 2
You are the super administrator of a new Cloud Identity account for example.com. You verified the domain and signed in to the Google Cloud console, so the Organization resource has been created. The security team says that no ordinary employee should be able to create projects or billing accounts until a governance process is ready. What should you do first?
- Remove the Organization Administrator role from the super administrator account.
- Grant the Organization Owner role to the gcp-org-admins@example.com group.
- Remove the Project Creator and Billing Account Creator role bindings that were automatically granted to the whole domain at the organization level.
- Delete the domain verification TXT record from the example.com DNS zone.
Show the answer
Answer: C. Remove the Project Creator and Billing Account Creator role bindings that were automatically granted to the whole domain at the organization level.
When a Cloud Identity organization is created, every user in the domain automatically gets Project Creator and Billing Account Creator at the organization level, so removing those bindings closes the gap. Removing Organization Administrator from the super administrator would not remove the employees' grants, and it would weaken your own ability to manage IAM.
Question 3
Your company's finance team needs to review costs and transactions on the corporate Cloud Billing account every month. They must not be able to change payment methods, link projects or create budgets. Following the principle of least privilege, which role should you grant them on the billing account?
- Billing Account Costs Manager (roles/billing.costsManager)
- Billing Account User (roles/billing.user)
- Billing Account Viewer (roles/billing.viewer)
- Billing Account Administrator (roles/billing.admin)
Show the answer
Answer: C. Billing Account Viewer (roles/billing.viewer)
Billing Account Viewer gives read-only access to costs and transactions, which is all the finance team needs. Billing Account Costs Manager is the closest distractor, but it also lets the user manage budgets and export cost data, which is more access than the requirement allows.
Question 4
A project has enable-oslogin=TRUE set in project metadata, and its VMs are managed through IAM. One legacy VM runs a third-party backup tool that can only sign in with an SSH key stored in instance metadata. No organization policy constraints apply to the project. You need the tool to keep working, and you need every other VM in the project to stay on OS Login. What should you do?
- Remove the enable-oslogin key from project metadata and set enable-oslogin=TRUE on every other VM
- Grant roles/compute.osLogin to the backup tool's account on the legacy VM
- Set enable-osconfig=FALSE in the instance metadata of the legacy VM
- Set enable-oslogin=FALSE in the instance metadata of the legacy VM only
Show the answer
Answer: D. Set enable-oslogin=FALSE in the instance metadata of the legacy VM only
Instance-level metadata overrides project-level metadata, so setting FALSE on one VM turns OS Login off for that VM only and lets its metadata SSH keys work again. Removing the project-level key would also work, but it means changing every other VM by hand and leaves new VMs unprotected, so it is not the best answer.
Question 5
You manage an auto mode VPC named dev-net that has running VMs. A new security policy says subnets must no longer be created automatically when Google adds regions, and the network team must choose every future subnet range. You must not recreate the network or move the VMs. What should you do?
- Run gcloud compute networks create dev-net --subnet-mode=custom to overwrite the existing network
- Run gcloud compute networks update dev-net --switch-to-custom-subnet-mode
- Delete dev-net and recreate it with gcloud compute networks create dev-net --subnet-mode=custom
- Run gcloud compute networks update dev-net --bgp-routing-mode=regional
Show the answer
Answer: B. Run gcloud compute networks update dev-net --switch-to-custom-subnet-mode
You can convert an auto mode network to custom mode in place. The existing subnets stay, and from then on new subnets are created only by you. Deleting and recreating the network also gives you custom mode, but it breaks the rule against recreating the network and moving the VMs.
Question 6
A cloud engineer holds the Owner role on a production project. She wants to use Gemini CLI in her terminal, with a Google Cloud MCP extension, to automate routine deployments. The security team asks what permissions the agent will have when it runs gcloud commands. What is the best answer?
- Gemini CLI runs commands as the engineer's own identity, so it has all of her Owner permissions. She should run it under an identity that has only the roles the task needs.
- Gemini CLI uses a Google-managed service agent that has read-only access, so it cannot change production resources.
- Gemini CLI gets its permissions from the App Design Center template it was installed from, so governance rules in that template limit it.
- Gemini CLI can only call the Gemini Cloud Assist API, so it cannot run shell or gcloud commands against the project.
Show the answer
Answer: A. Gemini CLI runs commands as the engineer's own identity, so it has all of her Owner permissions. She should run it under an identity that has only the roles the task needs.
Gemini CLI runs shell commands as your identity, so it has whatever IAM permissions you have. Here that means Owner, which is why least privilege matters. There is no Google-managed read-only service agent that limits it, so the agent can change production.
Question 7
A platform engineer runs `gcloud compute instances create` to add a second N1 VM with one NVIDIA T4 in us-central1-a. The zone offers the T4, and the project's regional `NVIDIA_T4_GPUS` quota for us-central1 has unused capacity. The command still fails with a quota error. The engineer has already confirmed that the zone, machine type and `--maintenance-policy=TERMINATE` flag are correct. What should the engineer do next?
- Change `--maintenance-policy=TERMINATE` to `--maintenance-policy=MIGRATE` so the VM can be placed on another host
- Increase the `NVIDIA_T4_GPUS` quota in a different region and re-run the command in us-central1-a
- Check the project-wide `GPUS_ALL_REGIONS` quota and request an increase on the Quotas page if it is too low
- Run `gcloud compute accelerator-types list` without a filter to find a zone where T4 GPUs are offered
Show the answer
Answer: C. Check the project-wide `GPUS_ALL_REGIONS` quota and request an increase on the Quotas page if it is too low
GPU creation is checked against two quotas: the per-model, per-region quota and the project-wide `GPUS_ALL_REGIONS` quota. Either one can block you, so the global quota is the remaining cause. Running the accelerator-types list command is the wrong next step, because the engineer has already confirmed that the zone offers the T4. The failure is a quota problem, not an availability problem.
Question 8
A cloud engineer must create a Cloud SQL for PostgreSQL instance in europe-west2 protected with CMEK. A colleague has already created a key ring and key in the global location and granted roles/cloudkms.cryptoKeyEncrypterDecrypter on it to the Cloud SQL service agent. Which approach meets the requirement?
- Use the existing global key, but grant roles/cloudkms.admin to the Cloud SQL service agent so that it can replicate the key to europe-west2
- Use the existing global key, because a global key ring can encrypt resources in any region
- Create a key ring and key in europe-west2, grant the Cloud SQL service agent the CryptoKey Encrypter/Decrypter role on that key, and pass it with --disk-encryption-key when you create the instance
- Create the instance with Google default encryption in europe-west2, then update it to use a europe-west2 key
Show the answer
Answer: C. Create a key ring and key in europe-west2, grant the Cloud SQL service agent the CryptoKey Encrypter/Decrypter role on that key, and pass it with --disk-encryption-key when you create the instance
The key's location must match the resource's location, so a europe-west2 instance needs a key ring in europe-west2, not global. Creating the instance first and adding CMEK afterwards also fails, because Cloud SQL CMEK can be set only when the instance is created.
Question 9
Your SRE lead wants the on-call team to receive a Slack message whenever Google posts or updates an incident that is relevant to the team's Google Cloud projects. Engineers should not need to check a dashboard. Irrelevant incidents in products or regions the team does not use should be filtered out. What should you do?
- Create a log-based alert in Cloud Logging on Personalized Service Health events and use Slack as the notification channel
- Start a Gemini Cloud Assist investigation each morning and share its Observations in Slack
- Have the team watch the public Google Cloud Service Health dashboard and post any new incident to Slack
- Create a Cloud Monitoring uptime check on each production endpoint and send its alerts to Slack
Show the answer
Answer: A. Create a log-based alert in Cloud Logging on Personalized Service Health events and use Slack as the notification channel
Personalized Service Health filters events to the ones relevant to your projects and writes them to Cloud Logging. From there, a log-based alert can notify Slack automatically. The public dashboard lists every incident without filtering, and someone would still have to check it by hand.
Question 10
You are a project owner in project acme-data. A platform engineer must be able to create user-managed service accounts for new pipelines. Your security policy says each person gets only the minimum role their task needs. The engineer does not need to attach accounts to workloads or create keys. Which role should you grant the engineer on the project?
- Service Account Token Creator (roles/iam.serviceAccountTokenCreator)
- Service Account User (roles/iam.serviceAccountUser)
- Service Account Key Admin (roles/iam.serviceAccountKeyAdmin)
- Create Service Accounts (roles/iam.serviceAccountCreator)
Show the answer
Answer: D. Create Service Accounts (roles/iam.serviceAccountCreator)
roles/iam.serviceAccountCreator is the role made for creating service accounts on a project, so it meets the least-privilege requirement. Service Account User is a real role, but it lets a principal attach or act as an existing service account. It does not let anyone create a new one.
The full timed mock
50 questions in 120 minutes, with a pass mark of 70%. Each paper is drawn from a bank of questions written for the mock alone, and these 10 are left out of it. Full access opens it, with every level of the course.
LevelUpWith is independent of the organisation that sets this exam. These questions were written for this course; they are not taken from the exam.