Answer By Gemini

The correct answer is A. Assign appropriate access for Google services to the service account used by the Compute Engine VM.

Here's why:

  • Compute Engine's Default Service Account: Compute Engine VMs have a default service account associated with them. This service account is the recommended way to authenticate applications running on the VM. By granting the necessary permissions to this existing service account, your application, which is already designed to use Application Default Credentials (ADC), will automatically pick up these permissions without requiring any code changes. This aligns with the principle of "minimal changes."

Why other options are incorrect:

  • B. Creating a new service account: While creating a new service account and configuring the application to use it would work, it requires modifying the application code, which violates the "minimal changes" requirement.

  • C & D. Storing credentials in a config file: Storing service account credentials (or your user account credentials) in a config file is a security risk and is strongly discouraged. It's much better to leverage the built-in service account mechanism provided by Compute Engine. These options are not recommended practices. They also require application code changes.

This page was last edited on 2025-02-07 04:32

Powered by Wiki|Docs

This page was last edited on 2025-02-07 04:32

Mac
To whom it may concern

Powered by Wiki|Docs