Google PCA Manage and provision cloud infrastructure Practice Question
A company wants to provision multiple similar environments (dev, test, prod) with consistent networking configurations. Which approach is a best practice for infrastructure as code?
⚠ Common exam trap
Google Cloud often tests the misconception that environment-specific parameters in Deployment Manager templates are equivalent to Terraform workspaces, but the trap is that Terraform's workspace feature provides native state isolation and multi-cloud portability, whereas Deployment Manager is GCP-specific and lacks the same level of abstraction for consistent multi-environment management.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use a single Terraform configuration with workspaces.
Terraform workspaces allow you to manage multiple distinct environments (e.g., dev, test, prod) from a single configuration by maintaining separate state files. This ensures consistent networking configurations across environments while avoiding duplication of code, which is a core best practice for infrastructure as code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Ansible playbooks to run ad-hoc commands.
Why it's wrong here
Ansible is more for configuration management, not provisioning infrastructure.
- ✓
Use a single Terraform configuration with workspaces.
Why this is correct
Workspaces allow reusable configuration across environments.
- ✗
Run separate gcloud commands for each environment.
Why it's wrong here
This is manual and error-prone.
- ✗
Use Cloud Deployment Manager templates with environment-specific parameters.
Why it's wrong here
While possible, it lacks the simplicity of Terraform workspaces.
Go deeper
Related to this question
Learn chapter
Virtual Private Cloud (VPC) Networking Basics
Key term
Internet Protocol
Internet Protocol (IP) is the set of rules that governs how data is addressed, routed, and sent from one device to another across networks, including the internet.
Key term
Software-defined Wide Area Network
A Software-defined Wide Area Network (SD-WAN) is a virtual network architecture that uses software to manage and optimize the connections between branch offices and data centers across a wide geographic area.
About these practice questions
One of 807 original PCA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCA practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCA exam.