Google Cloud Professional Cloud Network Engineer — Question 113

In your Google Cloud organization, you have two folders: Dev and Prod. You want a scalable and consistent way to enforce the following firewall rules for all virtual machines (VMs) with minimal cost:

• Port 8080 should always be open for VMs in the projects in the Dev folder.
• Any traffic to port 8080 should be denied for all VMs in your projects in the Prod folder.

What should you do?

Answer options

Correct answer: A

Explanation

The correct answer is A because creating and associating firewall policies with each folder allows for centralized management of the firewall rules, ensuring that the rules are consistently applied to all VMs in the respective folders. Options B and C involve creating VPCs and rules individually, which may not be as scalable or cost-effective. Option D, while it offers a way to enforce policies, is more complex and not necessary for the requirements laid out.