Google Associate Cloud Engineer Question 7
Single answerGoogle Cloud PlatformYour organization wants to ensure that all Google Cloud Platform (GCP) projects within a specific folder have a policy to restrict the creation of external IP addresses. How should you apply this policy to meet the requirement efficiently?
- A
Apply the policy at the organization level to cover all projects.
- B
Apply the policy directly to each project within the folder.
- C
Apply the policy at the folder level to inherit the restriction to all contained projects.
- D
Apply the policy to each individual resource within the projects.
Show answer and explanation
Correct answer: C
Explanation
The best practice in GCP for applying organizational policies is to use the resource hierarchy effectively. By applying the policy at the folder level, you ensure that all projects within that folder automatically inherit the policy, making it easier to manage and maintain consistent policy enforcement across multiple projects.
- A. Incorrect.
Applying the policy at the organization level will affect all projects and folders, not just the ones in the specific folder.
- B. Incorrect.
Applying the policy directly to each project is possible, but it is not efficient if there are many projects, and it does not scale well.
- C. Correct.
Applying the policy at the folder level ensures that all projects within that folder inherit the policy, providing an efficient and scalable solution.
- D. Incorrect.
Applying the policy to each individual resource is not practical and would be time-consuming, especially as new resources are created.