Skip to content

Files

Latest commit

 

History

History
33 lines (24 loc) · 773 Bytes

google-project-no-default-network.md

File metadata and controls

33 lines (24 loc) · 773 Bytes

Pattern: Use of auto_create_network Google Project

Issue: -

Description

The default network which is provided for a project contains multiple insecure firewall rules which allow ingress to the project's infrastructure. Creation of this network should therefore be disabled.

Resolution: Disable automatic default network creation.

Examples

Example of incorrect code:

resource "google_project" "bad_example" {
  name       = "My Project"
  project_id = "your-project-id"
  org_id     = "1234567"
  auto_create_network = true
}

Example of correct code:

resource "google_project" "good_example" {
  name       = "My Project"
  project_id = "your-project-id"
  org_id     = "1234567"
  auto_create_network = false
}