Google Professional Cloud DevOps Engineer Question 15
Single answerGoogle Cloud PlatformYou are managing the infrastructure for a production environment on Google Cloud. The development team wants to ensure that changes to the infrastructure are reviewed and applied consistently while minimizing the risk of manual errors. Additionally, you need the ability to roll back changes quickly in case of an issue. Which approach should you take to meet these requirements?
- A
Manually apply changes to the infrastructure using the Google Cloud Console.
- B
Use Deployment Manager or Terraform to define and manage infrastructure as code.
- C
Directly edit live infrastructure configurations using gcloud commands.
- D
Use a combination of shell scripts and manual approval processes to manage infrastructure.
Show answer and explanation
Correct answer: B
Explanation
Infrastructure as code (IaC) tools like Deployment Manager or Terraform provide a structured, auditable, and consistent way to manage infrastructure. They allow changes to be reviewed, applied in a controlled manner, and rolled back if needed. This approach reduces the risk of manual errors and aligns with DevOps best practices for managing production environments.
- A. Incorrect.
Manually applying changes through the Google Cloud Console increases the risk of human error and does not provide a consistent or auditable process for managing infrastructure.
- B. Correct.
Using Deployment Manager or Terraform to define infrastructure as code ensures consistency, allows changes to be reviewed, and provides the ability to roll back through version control, meeting the requirements of the scenario.
- C. Incorrect.
Directly editing live infrastructure configurations using gcloud commands might result in inconsistent changes and lacks the ability to review or roll back effectively.
- D. Incorrect.
While shell scripts and manual approval processes can automate some tasks, they lack the structure and scalability of infrastructure as code tools like Deployment Manager or Terraform.