GCP VPC Network subnets have Private Google access disabled
Description
Enabling private IP Google access for your Google Cloud Platform (GCP) subnet can help improve the security and performance of your network. Private IP Google access allows resources in your subnet to access Google APIs and services over a private IP connection, rather than a public connection.
Code Example
go
resource "google_compute_subnetwork" "pass" {
name = "example"
ip_cidr_range = "10.0.0.0/16"
network = "google_compute_network.vpc.self_link"
log_config {
aggregation_interval = "INTERVAL_10_MIN"
flow_sampling = 0.5
metadata = "INCLUDE_ALL_METADATA"
}
+ private_ip_google_access = true
}Remediation
Terraform
Rule Details
| Field | Value |
|---|---|
| ID | IAC-0932 |
| Severity | LOW |
| IaC Type | Terraform |
| Frameworks | Terraform |
| Checkov ID | CKV_GCP_74 |