Soru

Zorluk: OrtaManaging Networking Resources

A cloud engineer needs to enable Private Google Access on an existing subnetwork named `app-backend-subnet` located in the `us-east4` region. This is required so that Compute Engine instances without external IP addresses residing in this subnet can access Google Cloud APIs and services. Which `gcloud` command should the engineer run to modify the subnetwork settings correctly?

  1. gcloud compute networks subnets update app-backend-subnet --region=us-east4 --enable-private-ip-google-accessCevap
  2. B
    gcloud compute networks update app-backend-subnet --enable-private-ip-google-access
  3. C
    gcloud compute instances update --all --region=us-east4 --enable-private-google-access
  4. D
    gcloud compute firewall-rules create allow-google-apis --direction=EGRESS --action=ALLOW --rules=all --destination-ranges=0.0.0.0/0

Cevap

The command 'gcloud compute networks subnets update app-backend-subnet --region=us-east4 --enable-private-ip-google-access' correctly enables Private Google Access for instances in the specified subnetwork.
Private Google Access allows Compute Engine VMs with internal IP addresses only to reach Google APIs and services. It is enabled on a per-subnet basis using 'gcloud compute networks subnets update <SUBNET_NAME> --region=<REGION> --enable-private-ip-google-access'.

Adım Adım Çözüm

1
Identify the target resource and scope for Private Google Access.
Private Google Access is a regional subnetwork property, so the command must target 'gcloud compute networks subnets'.
VPC subnetworks are regional resources in GCP.
2
Select the appropriate gcloud subcommand and flag.
Use 'update' along with the flag '--enable-private-ip-google-access' and specify '--region=us-east4'.
The update subcommand modifies existing subnetwork settings without recreating the resource.

Anahtar Kavram

Subnet-level configuration for Private Google Access
Tahmini Süre:1m 30s
Bu soruyu puanla