exam questions

Exam Professional Cloud DevOps Engineer All Questions

View all questions & answers for the Professional Cloud DevOps Engineer exam

Exam Professional Cloud DevOps Engineer topic 1 question 152 discussion

Actual exam question from Google's Professional Cloud DevOps Engineer
Question #: 152
Topic #: 1
[All Professional Cloud DevOps Engineer Questions]

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?

  • A. • Cloud Infrastructure (Terraform) repository is shared: different directories are different environments
    • GKE Infrastructure (Anthos Config Management Kustomize manifests) repository is shared: different overlay directories are different environments
    • Application (app source code) repositories are separated: different branches are different features
  • B. • Cloud Infrastructure (Terraform) repository is shared: different directories are different environments
    • GKE Infrastructure (Anthos Config Management Kustomize manifests) repositories are separated: different branches are different environments
    • Application (app source code) repositories are separated: different branches are different features
  • C. • Cloud Infrastructure (Terraform) repository is shared: different branches are different environments
    • GKE Infrastructure (Anthos Config Management Kustomize manifests) repository is shared: different overlay directories are different environments
    • Application (app source code) repository is shared: different directories are different features
  • D. • Cloud Infrastructure (Terraform) repositories are separated: different branches are different environments
    • GKE Infrastructure (Anthos Config Management Kustomize manifests) repositories are separated: different overlay directories are different environments
    • Application (app source code) repositories are separated: different branches are different
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
cachopo
2 months, 1 week ago
Selected Answer: A
A. This follows best practices for structuring repositories in a GitOps workflow while maintaining clear separation between infrastructure and application code. - Cloud Infrastructure (Terraform) repository is shared with different directories for different environments. This ensures all infrastructure is managed from a single place while maintaining separation for different environments. - GKE Infrastructure (Anthos Config Management Kustomize manifests) repository is shared with different overlay directories for different environments. Kustomize overlays are the recommended way to manage configuration differences across environments. - Application repositories are separated, with different branches representing different features. This allows application teams to work independently while maintaining best practices for Git-based development.
upvoted 1 times
cachopo
2 months, 1 week ago
Why not the other options? B – Using separate repositories for GKE infrastructure per environment makes it harder to manage and track changes across environments. The best practice is to use a shared repository with overlays for different environments. C – Using branches instead of directories for different environments in Terraform is not ideal. Branching is better suited for version control rather than environment separation. Additionally, sharing an application repository and managing features via directories is not a common practice. D – Keeping separate Terraform repositories per environment leads to duplication and makes it harder to enforce consistency. Separate GKE infrastructure repositories also complicate GitOps workflows.
upvoted 1 times
...
...
alpha_canary
8 months, 3 weeks ago
Selected Answer: A
Why? "Cloud Infrastructure (Terraform) repository is shared: different directories are different environments" For GitOps, Google recommends: Use folders for variants of the configuration instead of branches. With folders, you can use the tree command to see variants. For example, with branches, you can't tell if the delta between a prod and stage branch is an upcoming change in configuration or a permanent difference between what stage and prod should look like. https://cloud.google.com/anthos-config-management/docs/concepts/gitops-best-practices#use-folders "GKE Infrastructure (Anthos Config Management Kustomize manifests) repository is shared: different overlay directories are different environments" https://cloud.google.com/anthos-config-management/docs/tutorials/multiple-environments-config-sync#repository_architecture
upvoted 2 times
...
kish18
10 months, 1 week ago
Selected Answer: A
this is the logial folder structure when dealing with multiple environments of tf, gke creating folders for separate environments, creating branches for releases
upvoted 2 times
...
Afonya
10 months, 2 weeks ago
Selected Answer: A
https://cloud.google.com/anthos-config-management/docs/concepts/gitops-best-practices#use-folders
upvoted 2 times
...
edd004
10 months, 3 weeks ago
Selected Answer: A
I agree with @YushiSato, Terraform and Kustomize would be best practice to represent environments by a directory. https://cloud.google.com/anthos-config-management/docs/tutorials/multiple-environments-config-sync#repository_architecture
upvoted 1 times
...
xhilmi
11 months ago
Selected Answer: B
Choose B Cloud Infrastructure (Terraform) repository is shared: Allows you to manage the IaC for different env same repo, with different directories representing different env. This makes it easy to maintain and update common IaC across env. GKE Infrastructure (Anthos Config Management Kustomize manifests) repositories are separated: Each env GKE configuration is kept in a separate repo, using different branches for different env. This separation ensures that the GKE configurations for different env are distinct and can be managed independently. Application (app source code) repositories are separated: Each application has its own repo, and different branches can be used for different features or env. This separation allows application owners to manage their code independently and follow GitOps principles for application deployment.
upvoted 1 times
...
YushiSato
12 months ago
Selected Answer: A
I think A is correct. In both Terraform and Kustomize, it would be common to represent the environment by a directory.
upvoted 3 times
YushiSato
12 months ago
https://cloud.google.com/anthos-config-management/docs/concepts/gitops-best-practices#use-folders
upvoted 1 times
...
...
mshafa
12 months ago
Selected Answer: B
Not sure, but I think it's better option.
upvoted 3 times
...
lelele2023
1 year ago
Selected Answer: C
It is recommended to use kustomize+ACM to manage multi environments using overlay+share-repo approach hence this narrows down to be either A or C. https://cloud.google.com/anthos-config-management/docs/tutorials/multiple-environments-config-sync#repository_architecture For app repo it should be shared therefore C is the right answer.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago