Google PCA Designing for Security and Compliance Practice Question
A company is migrating an on-premises application to Google Cloud. The application requires access to a legacy database that can only be reached from a specific on-premises IP address. The company has established a Cloud VPN tunnel. What is the MOST secure way to ensure that only the migrated application's Compute Engine instances can initiate connections to the on-premises database?
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
✓
Create a firewall egress rule with destination IP range of the on-premises database and source service account of the application instances
Using firewall rules with target service accounts allows you to control egress traffic based on the identity of the source instances, which is more secure than using tags or IP ranges.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a Cloud NAT and assign the application instances a static IP, then allow that IP in the on-premises firewall
Why it's wrong here
This approach is less secure because any instance with that static IP could access the database, and it doesn't leverage GCP identity.
- ✓
Create a firewall egress rule with destination IP range of the on-premises database and source service account of the application instances
Why this is correct
Using service accounts ensures only instances with that specific identity can access the database.
- ✗
Create a firewall egress rule with destination IP range of the on-premises database and source tags 'db-access'
Why it's wrong here
Tags can be applied to any instance, leading to potential misuse; service accounts are more secure.
- ✗
Use VPC Service Controls to create a perimeter around the application VPC
Why it's wrong here
VPC Service Controls protect managed services, not on-premises connectivity.
Go deeper
Related to this question
Learn chapter
Introduction to Google Cloud Platform
Key term
IP address
An IP address is a unique numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
This PCA question is part of Courseiva's 955-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.