A developer needs to call a GCP API from a Compute Engine VM without storing service account keys on disk. What is the recommended approach?
-
A
Download a JSON key file and store it in /etc/gcp/
-
B
Use the VM's attached service account and Application Default Credentials
-
C
Hard-code the API key in the application environment variables
-
D
Generate a short-lived OAuth token with gcloud each time