Check provider logo

Subnet has VPC Flow Logs enabled

compute_subnet_flow_logs_enabled

Severitymedium
Servicecompute
by Prowler

GCP VPC subnets have VPC Flow Logs enabled at the subnet scope to capture connection metadata for traffic to and from VM interfaces.

Risk

Without VPC Flow Logs, network activity lacks visibility, weakening detection and response. Blind spots enable covert data exfiltration (C), undetected lateral movement and policy bypass (I), and hinder containment and recovery (A). Forensics and cost insights are degraded.

Run this check with Prowler CLI

prowler gcp --checks compute_subnet_flow_logs_enabled

Recommendation

Enable VPC Flow Logs on all production subnets. Tune aggregation, sampling, and metadata to balance visibility and cost.

Export to centralized logging for analytics and alerting, apply least privilege to log access, and use organization guardrails to enforce consistent coverage as part of defense in depth.

Remediation

CLI

gcloud compute networks subnets update <SUBNET_NAME> --region <REGION> --enable-flow-logs

Terraform
Other
  1. In the Google Cloud console, go to Networking > VPC networks
  2. Open the Subnets tab and click the target subnet
  3. Click Edit
  4. Set Flow logs to On
  5. Click Save

Source Code

Resource Type

compute.googleapis.com/Subnetwork

References