Identify and release any unattached (unused) static external IP addresses from your Google Cloud Platform (GCP) project in order to lower the cost of your cloud bill. A static external IP address is an IP address that is reserved for your GCP project until you decide to release it. Google Cloud considers a static external IP address as in use if it's associated with a virtual machine (VM) instance, whether the VM instance is running or stopped. If the instance is deleted or if the IP address is dissociated from the instance, Google Cloud considers the static IP address as not in use.
Google Cloud charges for static IP addresses that are not attached to virtual machines (VM) instances or load balancers. If you reserve a static external IP address and do not assign it to a resource such as a VM instance or a forwarding rule, you will be charged at a higher rate than for static and ephemeral external IP addresses that are in use. To optimize cloud service usage charges and reduce your monthly Google Cloud bill, remove any unused static external IP addresses from your cloud account.
Audit
To identify any unattached static external IP addresses within your GCP projects, perform the following operations:
Remediation / Resolution
If a static external IP address is no longer in use, you can release the address to stop incur charges for it and return it to the general IP pool for other Compute Engine users. To release (delete) a static external IP address, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- VPC networks
- Configure static external IP addresses
- All networking pricing
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud compute addresses list
- gcloud compute addresses describe
- gcloud compute addresses delete