Your team wants to make sure Compute Engine instances running in your production project do not have public IP addresses.
The frontend application Compute Engine instances will require public IPs.
The product engineers have the Editor role to modify resources.
Your team wants to enforce this requirement.
How should your team meet these requirements?
Click on the arrows to vote for the correct answer
A. B. C. D.C.
https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-addressThe requirement is to ensure that Compute Engine instances running in the production project do not have public IP addresses while the frontend application Compute Engine instances will require public IPs. Additionally, the product engineers have the Editor role to modify resources, so the team needs to enforce this requirement.
Option A: Enable Private Access on the VPC network in the production project. Private access allows Compute Engine instances to access Google APIs and services using internal IP addresses rather than public IP addresses. This option can meet the requirement of not having public IPs on instances running in the production project. However, it does not address the requirement of allowing public IPs for frontend instances. Therefore, this option is not suitable.
Option B: Remove the Editor role and grant the Compute Admin IAM role to the engineers. The Compute Admin role grants permissions to create and manage compute resources, including instances. This option can allow the team to enforce the requirement of not having public IPs on instances running in the production project. However, it does not address the requirement of allowing public IPs for frontend instances. Therefore, this option is not suitable.
Option C: Set up an organization policy to only permit public IPs for the front-end Compute Engine instances. Organization policy allows administrators to restrict the configuration of resources within their organization. This option can meet both requirements of not having public IPs on instances running in the production project and allowing public IPs for frontend instances. The organization policy can be set to allow public IPs only for instances with a specific label or tag identifying them as frontend instances. This option is suitable.
Option D: Set up a VPC network with two subnets: one with public IPs and one without public IPs. A VPC network is a global resource that spans across all zones within a region. Each VPC network can have multiple subnets, which are regional resources. This option can meet both requirements of not having public IPs on instances running in the production project and allowing public IPs for frontend instances. However, it requires additional configuration to ensure that the instances are deployed in the appropriate subnet. This option is suitable but requires more effort than option C.
In conclusion, the best option to meet the requirements is to set up an organization policy to only permit public IPs for the front-end Compute Engine instances (Option C).