Enforce firewall rules across projects under two folders so: Dev projects always allow port 8080; Prod projects always deny port 8080. Provide a scalable, consistent, low-cost solution. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create and associate a firewall policy with the Dev folder with a rule to open port 8080. Create and associate a firewall policy with the Prod folder with a rule to deny traffic to port 8080..
Why this is the answer
Folder-level firewall policies are the most scalable and consistent solution for enforcing firewall rules across multiple projects within a folder. This approach centralizes management, ensuring all current and future projects within the Dev folder allow port 8080, and all projects within the Prod folder deny it. Shared VPCs are not ideal here because the requirement is to apply rules across projects within folders, not necessarily across different VPCs. While Shared VPCs can centralize networking, they don't directly address the folder-level policy enforcement for multiple projects. Creating individual VPC firewall rules in each VPC is not scalable or consistent, as it requires manual intervention for every new project or VPC. Anthos Config Connector is a powerful tool for managing resources, but for this specific scenario, folder-level firewall policies are a more direct and native GCP solution for hierarchical firewall enforcement.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed