Google Cloud Professional Cloud DevOps Engineer — Question 163

Your company uses Jenkins running on Google Cloud VM instances for CI/CD. You need to extend the functionality to use infrastructure as code automation by using Terraform. You must ensure that the Terraform Jenkins instance is authorized to create Google Cloud resources. You want to follow Google-recommended practices. What should you do?

Answer options

Correct answer: A

Explanation

The correct answer is A because having a service account with the right IAM permissions attached to the Jenkins VM instance is the most straightforward and secure way to authorize Terraform to manage Google Cloud resources. Option B is incorrect as it involves unnecessary complexity by using Secret Manager. Option C suggests creating a dedicated service account and manually setting credentials, which is less efficient than using the existing service account. Option D is also incorrect as it requires additional steps that are not necessary when proper IAM is configured.