Google Associate Cloud Engineer Question 10
Single answerGoogle Cloud PlatformAs a Google Cloud Associate Cloud Engineer, you need to ensure that no external IP addresses are assigned to any virtual machines in the production project within your organization. How can you apply this restriction across the resource hierarchy?
- A
A. Set an organization policy at the organization level to restrict external IP addresses.
- B
B. Apply a firewall rule at the project level to block external IP addresses.
- C
C. Use IAM roles to deny creation of external IP addresses at the project level.
- D
D. Set an organization policy at the project level to restrict external IP addresses.
Show answer and explanation
Correct answer: D
Explanation
To enforce a restriction on external IP addresses specifically for a single project, you should set an organization policy at the project level. This approach allows you to apply the policy precisely where it's needed, without affecting other projects within the organization.
- A. Incorrect.
Setting an organization policy at the organization level would affect all projects, not just the production project. This is too broad for the requirement.
- B. Incorrect.
Firewall rules manage network traffic but do not prevent the assignment of external IP addresses to VMs.
- C. Incorrect.
IAM roles control access to resources and actions but do not inherently restrict the types of resources, such as external IP addresses, that can be created.
- D. Correct.
Setting an organization policy at the project level allows you to enforce restrictions specifically for the production project, ensuring no VMs in this project can have external IPs.