Google PCA Designing for Security and Compliance Practice Question
A company uses Cloud Armor to protect an HTTP(S) Load Balancer. They want to block traffic from a specific IP address range during off-peak hours but allow it during peak hours. How can they achieve this?
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 Cloud Armor security policy rule with a condition on the IP address and a time condition
Cloud Armor security policies can use rules with conditions based on IP addresses and can also have time-based conditions (e.g., via headers or custom conditions). However, natively, Cloud Armor does not support scheduled rules. An alternative is to use a Cloud Function to modify the security policy based on time. But the simplest approach is to configure a rule with a condition that evaluates the request time using the `request.time` attribute if supported; else, use a Cloud Function to update rules. Given the options, the closest is using a rule that includes a time condition via `request.time` but that is not a standard feature. Actually, Cloud Armor rules can use expressions including `request.time` to match time windows. So the correct answer is a rule with a time condition.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Implement a Cloud Function that updates the security policy on a schedule
Why it's wrong here
While possible, it's not the most straightforward solution; Cloud Armor directly supports time conditions.
- ✓
Use a Cloud Armor security policy rule with a condition on the IP address and a time condition
Why this is correct
Cloud Armor supports rule conditions that can check the request time, allowing time-based blocking.
- ✗
Create two separate security policies and switch between them using Cloud Load Balancer URL maps
Why it's wrong here
URL maps route traffic, not security policies.
- ✗
Use VPC firewall rules to block the IP range during off-peak hours
Why it's wrong here
Firewall rules are at the network level, not the load balancer level, and are not time-based.
Go deeper
Related to this question
Learn chapter
Introduction to Google Cloud Platform
Key term
Load balancer
A load balancer is a device or software that distributes incoming network traffic across multiple servers so no single server gets overwhelmed.
Key term
CAN
A CAN (Controller Area Network) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other without a host computer.
About these practice questions
Courseiva writes every PCA question from scratch — 955 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.