QuestionQ96

VerifiedDeploying applications

You must deploy resources from your laptop to Google Cloud with Terraform. Resources in your Google Cloud environment must be created by using a service account. Your Cloud Identity has the Identity and Access Management (IAM) role roles/iam.serviceAccountTokenCreator and the required permissions to deploy the resources with Terraform. You want to configure your development environment to deploy the required resources according to Google-recommended best practices. What should you do?

Explanation

Service account impersonation lets a principal with roles/iam.serviceAccountTokenCreator obtain short-lived credentials for a service account. Setting auth/impersonate_service_account causes the Google Cloud CLI to use short-lived service-account credentials, so the access token supplied to Terraform authenticates Terraform as that service account. This avoids downloading and managing a long-lived service account key.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!