Google Professional Cloud Network Engineer Question 592
Single answerGoogle Cloud PlatformYour organization wants to enforce a policy that ensures Cloud NAT is used only in specific projects to meet compliance requirements. You are tasked with configuring an organization policy constraint to restrict Cloud NAT usage. Which constraint should you configure, and how should it be applied?
- A
Use the constraint
constraints/compute.restrictCloudNATUsage, and set it with an allowlist of permitted projects. - B
Use the constraint
constraints/compute.restrictExternalIP, and set it with a denylist of prohibited projects. - C
Use the constraint
constraints/compute.restrictCloudNATUsage, and set it with a denylist of prohibited projects. - D
Use the constraint
constraints/compute.restrictNetworkUsage, and set it with an allowlist of permitted projects.
Show answer and explanation
Correct answer: A
Explanation
To enforce a policy restricting Cloud NAT usage to specific projects, you should use the constraints/compute.restrictCloudNATUsage organization policy constraint. By setting an allowlist of permitted projects, you ensure that only the specified projects can create or use Cloud NAT, aligning with compliance requirements. Other constraints, like those for external IPs or general network usage, do not apply to Cloud NAT.
- A. Correct.
This is the correct approach. The constraint
constraints/compute.restrictCloudNATUsageallows you to enforce restrictions on Cloud NAT usage by specifying an allowlist of projects where it is permitted. - B. Incorrect.
This constraint is unrelated to Cloud NAT. The
constraints/compute.restrictExternalIPis used to restrict external IP addresses, not Cloud NAT usage. - C. Incorrect.
While the constraint
constraints/compute.restrictCloudNATUsageis correct, using a denylist is not the correct method here, as it is better practice to use an allowlist for stricter compliance enforcement. - D. Incorrect.
The
constraints/compute.restrictNetworkUsageis unrelated to Cloud NAT and is used to restrict access to specific networks, not Cloud NAT.