Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization manages a Shared VPC environment with hierarchical firewall policies, global network firewall policies, and legacy VPC firewall rules. To balance security visibility with Cloud Logging ingestion and storage costs, you must meet the following requirements:
200 of the hierarchical firewall policy org-policy and priority 500 of the global network firewall policy prod-global-policy.allow-api-ingress while omitting optional metadata fields to reduce storage costs.prod-subnet at the minimum secondary sampling rate permitted by the ESSENTIAL tier of constraints/compute.requireVpcFlowLogs.Which configuration should you implement?
gcloud compute firewall-policies rules update 200 --firewall-policy=org-policy --enable-logging and gcloud compute network-firewall-policies rules update 500 --firewall-policy=prod-global-policy --enable-logging, update allow-api-ingress with --enable-logging --logging-metadata=exclude-all, and enable VPC Flow Logs on prod-subnet with a secondary sampling rate of 0.1.This solution combines per-rule firewall logging across hierarchical, global network, and legacy VPC firewalls with sampled subnet telemetry via VPC Flow Logs, pairing the right API command groups and cost-control parameters for each resource type.
gcloud compute firewall-policies rules update enables logging on priority 200 of the hierarchical firewall policy (org-policy), while gcloud compute network-firewall-policies rules update enables logging on priority 500 of the global network firewall policy (prod-global-policy).allow-api-ingress with --logging-metadata=exclude-all keeps essential connection records (source/destination IPs, ports, protocol, timestamp, and rule reference) while omitting optional metadata fields to reduce Cloud Logging storage costs.flow_sampling) to 0.1 satisfies the ESSENTIAL tier minimum of constraints/compute.requireVpcFlowLogs.0.1 secondary sampling rate preserves volume and cost aggregates while avoiding full-rate ingestion charges.ESSENTIAL organization policy tier without risking uncaptured policy violations.It uses the exact gcloud CLI command groups required for each firewall tier, eliminates unnecessary metadata overhead on high-volume allow rules, and applies VPC Flow Logs at the lowest compliant sampling rate for continuous stream analysis.
gcloud compute firewall-policies rules update 200 --firewall-policy=org-policy --enable-logging and gcloud compute network-firewall-policies rules update 500 --firewall-policy=prod-global-policy --enable-logging, update allow-api-ingress with --enable-logging using default metadata settings, and rely on firewall rule connection records instead of VPC Flow Logs to monitor active, long-lived streams on prod-subnet.This configuration enables logging on the hierarchical and global network firewall policies, turns on logging for allow-api-ingress with default metadata settings, and attempts to use firewall rule connection records in place of VPC Flow Logs for monitoring active traffic streams.
--logging-metadata is omitted on a VPC firewall rule, it defaults to include-all. Including all instance, VPC, and remote location metadata fields increases log payload size and Cloud Logging storage costs, failing the requirement to omit optional fields.Deny + Log rules, which repeat every 5 seconds per unique 5-tuple).TCP and UDP connections, whereas VPC Flow Logs samples TCP, UDP, ICMP, ESP, GRE, and RDMA flows.You passed --logging-metadata=exclude-all to allow-api-ingress and enabled VPC Flow Logs on prod-subnet with a secondary sampling rate of 0.1.
gcloud compute firewall-policies rules update with --enable-logging for both org-policy (priority 200) and prod-global-policy (priority 500), update allow-api-ingress with --enable-logging --logging-metadata=custom-metadata, and enable VPC Flow Logs on prod-subnet with a secondary sampling rate of 0.1.This approach attempts to manage both hierarchical firewall policies and global network firewall policies using the firewall-policies command group while applying a VPC Flow Logs metadata option (custom-metadata) to a legacy VPC firewall rule.
gcloud compute firewall-policies rules update only applies to hierarchical firewall policies attached at the organization or folder level. Updating rules in a global or regional network firewall policy such as prod-global-policy requires the gcloud compute network-firewall-policies rules update command.include-all or exclude-all for the --logging-metadata flag. Passing custom-metadata fails validation because selective field filtering is exclusive to VPC Flow Logs.firewall-policies APIs.network-firewall-policies APIs.include-all or exclude-all) rather than granular field selection.INCLUDE_ALL_METADATA, EXCLUDE_ALL_METADATA, and CUSTOM_METADATA (with metadataFields) through the Network Management API.The configuration used gcloud compute network-firewall-policies rules update for prod-global-policy and specified --logging-metadata=exclude-all on allow-api-ingress.
gcloud compute firewall-policies rules update 200 --firewall-policy=org-policy --enable-logging and gcloud compute network-firewall-policies rules update 500 --firewall-policy=prod-global-policy --enable-logging, update allow-api-ingress with --enable-logging --logging-metadata=exclude-all, and enable VPC Flow Logs on prod-subnet with a secondary sampling rate of 0.05 and a 15-minute aggregation interval.This option correctly enables logging on the hierarchical firewall policy, global network firewall policy, and legacy VPC firewall rule (--logging-metadata=exclude-all), and extends the VPC Flow Logs aggregation interval to 15 minutes, but sets the secondary sampling rate to 0.05.
constraints/compute.requireVpcFlowLogs organization policy defines specific minimum secondary sampling thresholds: 1.0 for COMPREHENSIVE, 0.5 (default) for LIGHT, and 0.1 for ESSENTIAL. Setting flow_sampling to 0.05 falls below the 0.1 minimum required for the ESSENTIAL tier.0.1 (10%) increases the risk of missing critical short-lived flows, especially in dynamic workloads like GKE pods, without being compliant with the organization constraint.--aggregation-interval=interval-15-min is a valid cost-reduction practice for networks dominated by long-lived connections, as it consolidates sampled packets into fewer Cloud Logging entries.flow_sampling values greater than 0.0 up to 1.0, compliance guardrails enforce 0.1 as the lowest operational floor.0.5 default.The VPC Flow Logs secondary sampling rate were set to 0.1 instead of 0.05 to satisfy the ESSENTIAL tier of constraints/compute.requireVpcFlowLogs.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated