Google Associate Cloud Engineer Practice Test 14
Question 130
Two VMs in different regions belong to subnets of the same Google Cloud VPC, and neither has an external IPv4 address. What must be checked for them to communicate using internal addresses?
- Purchase public external IPv4 addresses for both VMs, because all cross-regional VPC traffic uses the public internet.
- Confirm VPC subnet routes, nonoverlapping addresses and effective firewall rules; internal connectivity does not require external IPs.
- Move both VMs into a single subnet in the same region because a global VPC never routes between regional subnets.
- Link both VMs to the same billing account, which automatically opens all internal firewall paths.
Explanation
Correct Answer
B:Confirm VPC subnet routes, nonoverlapping addresses and effective firewall rules; internal connectivity does not require external IPs. Google VPCs are global and support internal communication among regional subnets. Routes and firewall rules still determine whether a particular flow succeeds.
Incorrect Answers
A:Purchase public external IPv4 addresses for both VMs, because all cross-regional VPC traffic uses the public internet. Same-VPC internal connectivity uses private addresses and routes. A public IPv4 address is not a prerequisite for traffic between regional subnets.
C:Move both VMs into a single subnet in the same region because a global VPC never routes between regional subnets. A global VPC can route among its regional subnets. Moving VMs sacrifices regional deployment without addressing the real route and firewall conditions.
D:Link both VMs to the same billing account, which automatically opens all internal firewall paths. Billing associations are financially scoped and do not authorize IP traffic or override effective network firewall policy.
Question 131
A company wants one networking team to create and govern VPC subnets, while application workloads reside in separate Google Cloud projects. What architecture centralizes those network resources?
- Create a different VPC in every service project and rely on identical subnet names to make them shared.
- Use Cloud Billing labels to share the same subnet across projects that have matching cost-center values.
- Assign all application teams organization Owner so each can edit subnets in any project directly.
- Designate a Shared VPC host project and attach authorized service projects that use its centrally administered subnets.
Explanation
Correct Answer
D:Designate a Shared VPC host project and attach authorized service projects that use its centrally administered subnets. Shared VPC separates the host project's central VPC/subnets from service projects that deploy workloads. It allows delegated subnet use without giving each application team network administration.
Incorrect Answers
A:Create a different VPC in every service project and rely on identical subnet names to make them shared. VPC networks and subnets are project-owned resources. Matching names do not create a shared data plane or delegated host-project network permissions.
B:Use Cloud Billing labels to share the same subnet across projects that have matching cost-center values. Billing labels affect allocation/reporting, not VPC attachment or subnet sharing. They cannot connect projects to a common network.
C:Assign all application teams organization Owner so each can edit subnets in any project directly. Organization Owner is needlessly broad and is not the networking architecture that separates central subnet control from application resource ownership.
Question 132
A Shared VPC service-project administrator can create VMs but cannot change an ingress firewall rule owned by the host project. Which delegation boundary explains the denial?
- The service project must first be linked to the same Cloud Billing account as the host, which grants all host firewall edit permissions.
- Service-project Compute Instance Admin includes host-project network administration through automatic inheritance.
- The administrator needs a Cloud Storage Object Admin role on the service project to change a VPC firewall rule.
- The firewall belongs to the host-project VPC; host-network administration must be granted separately by authorized host administrators.
Explanation
Correct Answer
D:The firewall belongs to the host-project VPC; host-network administration must be granted separately by authorized host administrators. The VPC and its firewall rules are managed in the host project. Only a principal with appropriate host-project network permissions can change them.
Incorrect Answers
A:The service project must first be linked to the same Cloud Billing account as the host, which grants all host firewall edit permissions. Using a common billing account does not create host-project IAM rights to change firewall rules.
B:Service-project Compute Instance Admin includes host-project network administration through automatic inheritance. Shared VPC separates service-project VM administration from control of networks defined in the host project; those rights are not inherited automatically.
C:The administrator needs a Cloud Storage Object Admin role on the service project to change a VPC firewall rule. Cloud Storage object permissions govern bucket objects and have no authority over a Compute Engine VPC firewall resource.
Question 133
Two nonoverlapping standalone VPC networks need private VM-to-VM connectivity for a new service. They have no existing VPN, peering or interconnect route. Which design action establishes a supported private path?
- Give both VMs the same host name, because identical VM names automatically establish cross-VPC routes.
- Configure a suitable connectivity mechanism such as VPC Network Peering or Cloud VPN and validate the required routes and firewall policies.
- Enable the same Google Cloud API in both projects; Service Usage activation automatically exchanges private subnet routes.
- Assign the two VPCs to the same resource folder; folders merge their subnet route tables by inheritance.
Explanation
Correct Answer
B:Configure a suitable connectivity mechanism such as VPC Network Peering or Cloud VPN and validate the required routes and firewall policies. Separate VPCs require an explicit supported connectivity design. Peering or VPN can connect eligible networks once CIDR, routing and firewall conditions are satisfied.
Incorrect Answers
A:Give both VMs the same host name, because identical VM names automatically establish cross-VPC routes. VM names are identifiers within projects and do not provide L3 connectivity or a route between separate network resources.
C:Enable the same Google Cloud API in both projects; Service Usage activation automatically exchanges private subnet routes. API enablement controls service availability, not private routing between different VPC networks.
D:Assign the two VPCs to the same resource folder; folders merge their subnet route tables by inheritance. Organization folders govern access and policies. They do not automatically peer or merge independent VPC routes.
Question 134
An operator plans to use a Cloud NAT gateway to allow users on the public internet to SSH into private VMs. Why is the design incorrect?
- Allow SSH inbound from the internet by creating a Cloud NAT gateway and no other access path.
- Assign Cloud NAT more external addresses so unsolicited SSH connections are accepted.
- Use an authorized inbound administrative access method such as IAP TCP forwarding; NAT alone cannot initiate inbound sessions.
- Place the VM in a private subnet and disable all audit logging.
Explanation
Correct Answer
C:For a private VM, use a controlled inbound approach that authenticates and authorizes administrators, such as IAP TCP forwarding with suitable firewall policy. Cloud NAT permits egress and return traffic, not arbitrary incoming SSH sessions.
Incorrect Answers
A:Public NAT is an outbound translation service and does not establish an unsolicited inbound SSH listener.
B:Additional NAT addresses increase supported outbound capacity, not direct inbound reachability to private VMs.
D:Disabling logs reduces visibility while doing nothing to create a secure administrative connection.
Question 135
A private Compute Engine VM has no external IP and must download security packages from an ordinary public repository on the internet. The subnet has no outbound NAT. Which approved networking component addresses this egress?
- Enable Private Google Access only; that provides public access to any external package website on the internet.
- Create an inbound load balancer for the VM, because inbound frontend listeners perform all outbound connections.
- Configure Public NAT/Cloud NAT with appropriate subnet eligibility and outbound routing and firewall rules.
- Give the VM service account Cloud Billing Administrator; billing roles automatically provide public internet egress.
Explanation
Correct Answer
C:Configure Public NAT/Cloud NAT with appropriate subnet eligibility and outbound routing and firewall rules. Cloud NAT can provide internet egress for VMs with only internal addresses, while routing and firewall configuration must also allow the flow.
Incorrect Answers
A:Enable Private Google Access only; that provides public access to any external package website on the internet. Private Google Access targets eligible Google APIs and services. It is not general outbound internet NAT for arbitrary public mirrors.
B:Create an inbound load balancer for the VM, because inbound frontend listeners perform all outbound connections. An inbound load balancer receives traffic destined for backends; it does not provide generic source NAT for the VM's outbound package requests.
D:Give the VM service account Cloud Billing Administrator; billing roles automatically provide public internet egress. Cloud Billing rights govern cost administration and do not allocate a public source address or create an egress gateway.
Question 136
A VM has only an internal IP and cannot reach supported public Google APIs from its VPC subnet. DNS, firewall and routes meet the documented API network requirements. Which subnet-level setting should be examined?
- Enable Private Google Access on the VM's subnet so internal-address-only VMs can reach supported Google APIs.
- Create an unassociated billing account; unlinked accounts provide the necessary Google API network route.
- Grant Compute Engine SSH permissions on the VM, because guest login authorization is the network egress setting.
- Change the subnet display name to private-google; the name automatically enables API access.
Explanation
Correct Answer
A:Enable Private Google Access on the VM's subnet so internal-address-only VMs can reach supported Google APIs. Private Google Access is configured per subnet and lets internal-IP-only VMs reach supported Google APIs when DNS, routing and firewall prerequisites are satisfied.
Incorrect Answers
B:Create an unassociated billing account; unlinked accounts provide the necessary Google API network route. Billing account configuration does not enable private network access to Google API endpoints; the VM is already on an existing subnet.
C:Grant Compute Engine SSH permissions on the VM, because guest login authorization is the network egress setting. SSH login rights control guest access, not whether the subnet provides the Private Google Access connectivity path.
D:Change the subnet display name to private-google; the name automatically enables API access. Subnet name changes do not toggle the Private Google Access attribute or resolve missing Google API routing support.
Question 137
An engineer expects enabling Private Google Access to let an internal-only VM reach an unrelated public package repository. What additional path may be needed?
- Enable Private Google Access on the subnet and assume it provides internet access to every external domain.
- Make the VM a Cloud Billing administrator so the package repository becomes reachable.
- Configure approved outbound internet connectivity through Public NAT or a controlled egress proxy.
- Move the package repository URL into the VM metadata and retry the download.
Explanation
Correct Answer
C:A private VM without an external IP needs a permitted egress path to reach a public third-party repository. Public NAT or a policy-controlled proxy can provide it while maintaining the required outbound firewall rules.
Incorrect Answers
A:Private Google Access supports eligible Google services, not general internet destinations such as a third-party package mirror.
B:Billing rights cannot create a network route or source NAT for outbound connections.
D:VM metadata is configuration storage, not an internet gateway or DNS substitute.
Question 138
A team wants external callers to access only a Cloud Run endpoint and not the private internal database. Which network boundary should be preserved?
- Assign a public IP address to the database so users can reach it through the Cloud Run service.
- Expose only the Cloud Run application through approved ingress and authentication; keep the database on a restricted private path.
- Disable Cloud Run authentication and grant database Admin to every unauthenticated request.
- Give the database the same public ingress policy as the application for consistent routing.
Explanation
Correct Answer
B:The external request should terminate at the application boundary. Configure Cloud Run ingress and authentication for callers, then authorize the service identity to reach the database over its supported private connectivity path.
Incorrect Answers
A:The database does not need direct public exposure merely because an application has public users.
C:Removing both access controls expands the attack surface and is unrelated to the requested backend isolation.
D:Identical public policies for frontend and data tier defeat the intended network separation.
Question 139
A company wants to prevent untrusted egress from regulated workloads while retaining named approved Google API endpoints. What is safer than blanket internet access?
- Permit unrestricted outbound internet and trust application code not to call unapproved destinations.
- Turn off DNS entirely, preventing both malicious sites and legitimate Google API lookups.
- Use supported private/restricted Google API endpoints with approved DNS and explicit egress controls.
- Grant organization Owner to every VM service account to bypass internet routing restrictions.
Explanation
Correct Answer
C:The architecture should distinguish approved Google API traffic from general internet egress. Use the documented endpoint and DNS path appropriate to the services, paired with scoped routing/firewall restrictions and identity-based authorization.
Incorrect Answers
A:Unrestricted egress leaves regulated workloads able to contact unapproved external destinations.
B:Disabling DNS indiscriminately also breaks required API resolution and is not a usable selective policy.
D:More IAM permissions do not create selective network egress boundaries.
Question 140
A network operator creates an egress firewall rule but leaves an earlier higher-priority deny rule active. Why do packets still fail?
- Inspect rule hierarchy, priorities, direction, applicable targets and logs; change the winning deny rule only if approved.
- Add a lower-priority allow rule because every later allow always overrides an earlier deny.
- Rename the VM instance to match the allow rule description.
- Increase the instance’s CPU quota so firewall evaluation skips a deny.
Explanation
Correct Answer
A:Firewall decisions depend on applicable policy rules and priorities. Determine which rule actually matches the traffic; a planned, least-privilege change must address that rule or its intended scope, not simply add another ineffective allow.
Incorrect Answers
B:A lower-priority allow does not override a higher-priority applicable deny rule.
C:Resource naming is not a substitute for matching firewall priorities, sources and targets.
D:Compute quota controls capacity and has no effect on firewall allow/deny evaluation.