lacework-global-258
Ensure Legacy Networks Do Not Exist for Older Projects (Automated)
Profile Applicability
• Level 1
Description
In order to prevent use of legacy networks, a project should not have a legacy network configured. As of now, Google Cloud is gradually phasing out Legacy Networks, and you can no longer create projects with them. This recommendation ensures older projects are not using Legacy Networks.
Rationale
Legacy networks have a single network IPv4 prefix range and a single gateway IP address for the whole network. The network is global in scope and spans all cloud regions. Subnetworks cannot be created in a legacy network and are unable to switch from legacy to auto or custom subnet networks. Legacy networks can have an impact for high network traffic projects and are subject to a single point of contention or failure.
Impact
None.
Audit
For each Google Cloud Platform project,
- Set the project name in the Google Cloud Shell:
gcloud config set project <Project-ID>
- List the networks configured in that project:
gcloud compute networks list
None of the listed networks should be in the legacy
mode.
Remediation
For each Google Cloud Platform project,
- Follow the documentation and create a non-legacy network suitable for the organization's requirements.
- Follow the documentation and delete the networks in the
legacy
mode.
References
https://cloud.google.com/vpc/docs/using-legacy#creating_a_legacy_network
https://cloud.google.com/vpc/docs/using-legacy#deleting_a_legacy_network