Google Cloud Professional Cloud DevOps Engineer — Question 161

You are designing a system with three different environments: development, quality assurance (QA), and production. Each environment will be deployed with Terraform and has a Google Kubernetes Engine (GKE) cluster created so that application teams can deploy their applications. Anthos Config Management will be used and templated to deploy infrastructure level resources in each GKE cluster. All users (for example, infrastructure operators and application owners) will use GitOps. How should you structure your source control repositories for both Infrastructure as Code (IaC) and application code?

Answer options

Correct answer: A

Explanation

Option A is correct because it allows for shared repositories for cloud infrastructure and GKE infrastructure while maintaining separate application repositories, which is a best practice for managing environments. Options B, C, and D introduce unnecessary complexity by separating repositories or using branches incorrectly, which can complicate deployment and version control.