What is Terraform in the context of cloud infrastructure?
Terraform is an open-source tool that lets you define and manage cloud infrastructure using code. It works across many cloud providers, including Google Cloud, allowing you to create, change, and improve infrastructure safely and predictably.
Click to reveal answer
beginner
What is Google Cloud Deployment Manager?
Deployment Manager is Google Cloud's native infrastructure management service. It lets you create and manage Google Cloud resources using configuration files written in YAML or Python.
Click to reveal answer
intermediate
Name one key advantage of using Terraform over Deployment Manager.
Terraform supports multiple cloud providers, so you can manage resources across different clouds with one tool. Deployment Manager only works with Google Cloud.
Click to reveal answer
intermediate
When might Deployment Manager be a better choice than Terraform?
If you only use Google Cloud and want a tool fully integrated with Google Cloud services and APIs, Deployment Manager might be simpler and more straightforward.
Click to reveal answer
intermediate
What is a common factor to consider when choosing between Terraform and Deployment Manager?
Consider your team's familiarity with the tools, the need for multi-cloud support, and how complex your infrastructure is. Also, think about community support and available modules or templates.
Click to reveal answer
Which tool supports managing infrastructure across multiple cloud providers?
ANeither
BDeployment Manager
CTerraform
DBoth
✗ Incorrect
Terraform supports multiple cloud providers, while Deployment Manager is specific to Google Cloud.
What language is primarily used to write Deployment Manager configurations?
AYAML or Python
BHCL (HashiCorp Configuration Language)
CJSON
DJavaScript
✗ Incorrect
Deployment Manager uses YAML or Python for its configuration files.
Which tool is open-source and widely used outside Google Cloud?
ADeployment Manager
BGoogle Cloud Console
CCloud Shell
DTerraform
✗ Incorrect
Terraform is open-source and supports many cloud providers.
If your team only uses Google Cloud and wants tight integration, which tool might be simpler?
ADeployment Manager
BTerraform
CAWS CloudFormation
DAnsible
✗ Incorrect
Deployment Manager is Google Cloud's native tool and integrates well with its services.
Which factor is NOT important when choosing between Terraform and Deployment Manager?
AMulti-cloud support
BColor of the tool's logo
CTeam familiarity
DCommunity support
✗ Incorrect
The color of the tool's logo does not affect the decision.
Explain the main differences between Terraform and Deployment Manager and when you might choose one over the other.
Think about cloud support, languages used, and integration.
You got /4 concepts.
List key factors to consider when deciding between Terraform and Deployment Manager for managing Google Cloud infrastructure.
Focus on practical decision points for teams.
You got /4 concepts.
Practice
(1/5)
1. Which tool is best described as Google Cloud's native infrastructure management service?
easy
A. Deployment Manager
B. Terraform
C. Ansible
D. Chef
Solution
Step 1: Understand native tools in GCP
Deployment Manager is built by Google specifically for managing GCP resources.
Step 2: Compare with other tools
Terraform is multi-cloud and not native to GCP, while Ansible and Chef are configuration management tools, not native GCP infrastructure managers.
Final Answer:
Deployment Manager -> Option A
Quick Check:
Native GCP tool = Deployment Manager [OK]
Hint: Native GCP tool means Deployment Manager [OK]
Common Mistakes:
Confusing Terraform as native to GCP
Mixing configuration tools with infrastructure tools
Assuming multi-cloud tools are native
2. Which syntax snippet correctly initializes a Terraform configuration for Google Cloud?
easy
A. resource "gcp_project" { name = "my-project" }
B. provider "google" { project = "my-project" region = "us-central1" }
C. deployment "my-deployment" { config: "config.yaml" }
D. service "google" { project = "my-project" }
Solution
Step 1: Identify Terraform provider syntax
Terraform uses the keyword 'provider' with the provider name and configuration inside curly braces.
Step 2: Check other options
resource "gcp_project" { name = "my-project" } uses incorrect resource type, C is Deployment Manager style, D uses invalid keyword 'service'.
Final Answer:
provider "google" { project = "my-project" region = "us-central1" } -> Option B
4. You wrote a Deployment Manager config but get an error: Invalid resource type. What is the most likely cause?
medium
A. Missing project ID in the config file
B. Not enabling the Compute Engine API
C. Incorrect indentation in YAML file
D. Using a Terraform resource type in Deployment Manager config
Solution
Step 1: Understand resource types in Deployment Manager
Deployment Manager requires resource types specific to GCP and its own syntax, not Terraform resource types.
Step 2: Identify error cause
Using Terraform resource types in Deployment Manager config causes 'Invalid resource type' error.
Final Answer:
Using a Terraform resource type in Deployment Manager config -> Option D
Quick Check:
Resource types must match tool syntax [OK]
Hint: Use correct resource types per tool [OK]
Common Mistakes:
Confusing Terraform and Deployment Manager resource types
Ignoring API enablement errors
Assuming YAML indentation causes resource type errors
5. Your team needs to manage infrastructure across multiple clouds with a single tool and prefers simple, readable syntax. Which tool should you choose?
hard
A. Deployment Manager because it is native to GCP
B. Use Deployment Manager with custom scripts for multi-cloud
C. Terraform because it supports multiple clouds and has simple syntax
D. Manual scripting with gcloud CLI for flexibility
Solution
Step 1: Analyze multi-cloud support
Deployment Manager only supports GCP, so it cannot manage multiple clouds.
Step 2: Consider syntax and team preference
Terraform supports multiple clouds and uses simple, readable syntax, fitting team needs.
Step 3: Evaluate other options
Manual scripting is error-prone and less maintainable; Deployment Manager with scripts is complex and limited to GCP.
Final Answer:
Terraform because it supports multiple clouds and has simple syntax -> Option C
Quick Check:
Multi-cloud + simple syntax = Terraform [OK]
Hint: Multi-cloud needs point to Terraform [OK]
Common Mistakes:
Choosing Deployment Manager for multi-cloud
Thinking manual scripts are simpler
Assuming Deployment Manager can be extended easily for other clouds
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.