nerdexam
Google

ASSOCIATE-CLOUD-ENGINEER · Question #53

You have a Linux VM that must connect to Cloud SQL. You created a service account with the appropriate access rights. You want to make sure that the VM uses this service account instead of the default

The correct answer is A. When creating the VM via the web console, specify the service account under the `Identity and. Changing the service account and access scopes for an instance If you want to run the VM as a different identity, or you determine that the instance needs a different set of scopes to call the required APIs, you can change the service account and the access scopes of an existing

Submitted by klara.se· Mar 30, 2026Configuring access and security

Question

You have a Linux VM that must connect to Cloud SQL. You created a service account with the appropriate access rights. You want to make sure that the VM uses this service account instead of the default Compute Engine service account. What should you do?

Options

  • AWhen creating the VM via the web console, specify the service account under the `Identity and
  • BDownload a JSON Private Key for the service account.
  • CDownload a JSON Private Key for the service account.
  • DDownload a JSON Private Key for the service account.

How the community answered

(53 responses)
  • A
    85% (45)
  • B
    8% (4)
  • C
    6% (3)
  • D
    2% (1)

Explanation

Changing the service account and access scopes for an instance If you want to run the VM as a different identity, or you determine that the instance needs a different set of scopes to call the required APIs, you can change the service account and the access scopes of an existing instance. For example, you can change access scopes to grant access to a new API, or change an instance so that it runs as a service account that you created, instead of the Compute Engine default service account. However, Google recommends that you use the fine-grained IAM policies instead of relying on access scopes to control resource access for the service account. To change an instance's service account and access scopes, the instance must be temporarily stopped. To stop your instance, read the documentation for Stopping an instance. After changing the service account or access scopes, remember to restart the instance. Use one of the following methods to the change service account or access scopes of the stopped instance. https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances

Topics

#service account#Compute Engine#VM identity#access control

Community Discussion

No community discussion yet for this question.

Full ASSOCIATE-CLOUD-ENGINEER Practice