VPC flow logs should be enabled for all subnetworks
VPC flow logs record information about all traffic, which is a vital tool in reviewing anomalous traffic.
Impact
Recommended Actions
Follow the appropriate remediation steps below to resolve the issue.
Enable VPC flow logs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
resource "google_compute_subnetwork" "good_example" {
name = "test-subnetwork"
ip_cidr_range = "10.2.0.0/16"
region = "us-central1"
network = google_compute_network.custom-test.id
secondary_ip_range {
range_name = "tf-test-secondary-range-update1"
ip_cidr_range = "192.168.10.0/24"
}
log_config {
aggregation_interval = "INTERVAL_10_MIN"
flow_sampling = 0.5
metadata = "INCLUDE_ALL_METADATA"
}
}
resource "google_compute_network" "custom-test" {
name = "test-network"
auto_create_subnetworks = false
}
|