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.
Question
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)- A17% (6)
- B71% (25)
- C6% (2)
- D6% (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.
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.
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.
Storing code in Google Drive lacks proper version control, branching, merging capabilities, and conflict resolution, making it unsuitable for collaborative infrastructure as code development.
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
Community Discussion
No community discussion yet for this question.