PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice question 23 of 25

Your company recently migrated to Google Cloud. You need to design a fast, reliable, and repeatable solution for your company to provision new projects and basic resources in Google Cloud. What should you do?

Full set: 205 questions
Answer options
A: Use the Google Cloud console to create projects.
B: Write a script by using the gcloud CLI that passes the appropriate parameters from the request. Save the script in a Git repository.
C: Write a Terraform module and save it in your source control repository. Copy and run the apply command to create the new project.
D: Use the Terraform repositories from the Cloud Foundation Toolkit. Apply the code with appropriate parameters to create the Google Cloud project and related resources. Correct answer
Correct Answer:
D. Use the Terraform repositories from the Cloud Foundation Toolkit. Apply the code with appropriate parameters to create the Google Cloud project and related resources.
Explanation

The Cloud Foundation Toolkit (CFT) provides a series of Google-supported, production-grade Terraform modules that follow Google Cloud's best practices. Using the CFT for project creation ensures a fast, reliable, and repeatable process. This approach leverages pre-built, tested, and opinionated modules, which is more efficient and robust than writing custom scripts or Terraform configurations from scratch for foundational setups. It is the recommended starting point for establishing an enterprise-ready cloud foundation.

Why Incorrect

A. Using the Google Cloud console is a manual process, which is not repeatable, scalable, or fast for provisioning multiple projects and resources, and is prone to human error.
B. A gcloud script is repeatable but is an imperative approach. It lacks the state management and declarative nature of tools like Terraform, making it less reliable for managing infrastructure over time.
C. Writing a custom Terraform module is a valid Infrastructure as Code approach, but it requires more effort than using the pre-built, best-practice modules available in the Cloud Foundation Toolkit.

References

1. Google Cloud Documentation, "Cloud Foundation Toolkit": "The Google Cloud Foundation Toolkit provides you with a series of reference templates for Deployment Manager and Terraform that embody the best practices... You can use these templates as a starting point to build your own production-grade enterprise foundation in Google Cloud."

2. Google Cloud Architecture Center, "Managing infrastructure as code with Terraform, Cloud Build, and GitOps": This document outlines best practices, and leveraging the CFT is a core part of the recommended approach for foundational resources. Section: "Use the Cloud Foundation Toolkit".

Scroll to Top