nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #154

You are responsible for creating and modifying the Terraform templates that define your Infrastructure. Because two new engineers will also be working on the same code, you need to define a process an

The correct answer is B. Store your code in a Git-based version control system. Establish a process that includes code. To manage Terraform templates collaboratively and prevent overwrites while capturing all updates, storing code in a Git-based version control system with a code review process is the recommended solution.

Submitted by kavita_s· Apr 18, 2026Building and implementing CI/CD pipelines for a service

Question

You are responsible for creating and modifying the Terraform templates that define your Infrastructure. Because two new engineers will also be working on the same code, you need to define a process and adopt a tool that will prevent you from overwriting each other's code. You also want to ensure that you capture all updates in the latest version. What should you do?

Options

  • AStore your code in a Git-based version control system. Establish a process that allows developers
  • BStore your code in a Git-based version control system. Establish a process that includes code
  • CStore your code as text files in Google Drive in a defined folder structure that organizes the files.
  • DStore your code as text files in Google Drive in a defined folder structure that organizes the files.

How the community answered

(35 responses)
  • A
    17% (6)
  • B
    71% (25)
  • C
    6% (2)
  • D
    6% (2)

Why each option

To manage Terraform templates collaboratively and prevent overwrites while capturing all updates, storing code in a Git-based version control system with a code review process is the recommended solution.

AStore your code in a Git-based version control system. Establish a process that allows developers

While Git is correct for version control, a process that *allows* developers to bypass peer review and push directly to main without code reviews would lead to potential errors and quality issues, and not effectively ensure all updates are captured in a controlled manner.

BStore your code in a Git-based version control system. Establish a process that includes codeCorrect

A Git-based version control system provides robust features like branching, merging, and commit history to manage concurrent changes to code, preventing overwrites. Implementing a code review process further ensures quality, adherence to standards, and collaborative validation before changes are integrated into the main branch, thus capturing all updates in a controlled manner.

CStore your code as text files in Google Drive in a defined folder structure that organizes the files.

Storing code in Google Drive lacks proper version control, branching, merging capabilities, and conflict resolution, making it unsuitable for collaborative infrastructure as code development.

DStore your code as text files in Google Drive in a defined folder structure that organizes the files.

Google Drive is not a version control system and does not provide the necessary mechanisms for multiple developers to safely collaborate on code without overwriting each other's work or properly tracking changes.

Concept tested: Infrastructure as Code version control and collaboration

Source: https://cloud.google.com/architecture/managing-infrastructure-as-code-with-terraform-and-cloud-build

Topics

#Version Control#Git#Infrastructure as Code#Code Review

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice