Google Cloud: release unused static external IPs

Google Cloud charges more for a reserved, unused static external IP than for one in use. How to find them with gcloud, release and watch them with Terraform.

A reserved static external IP that no resource uses is billed hourly, at a higher rate than an address in use.

Policy at a glance

Provider
Google Cloud
Resource
Compute Engine static external IP addresses (regional and global).
What to check
Addresses with status RESERVED: reserved and used by no resource.
Risk
Medium: once released, you may not be able to get the same IP back.
Effort
Low: one gcloud compute addresses list and one release per address.

Why it matters: an unused IP costs twice as much as a used one

Google Cloud turns intuition around: a reserved static external IP that is not assigned to any resource is neither free nor cheaper, it is more expensive. The network pricing page says so explicitly: 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 are charged at a higher rate than for static and ephemeral external IP addresses that are in use.

The figures, in that page's table for us-central1 (Iowa), read on 15 November 2026: USD 0.01 per hour for an unused reserved static IP, versus USD 0.005 per hour for an IP in use on a standard VM and USD 0.0025 on a Spot or preemptible VM. IPs assigned to forwarding rules or used by a Cloud VPN tunnel are not charged. A forgotten IP is about USD 7.20 in a 30-day month.

The free tier for unused IPs is one hour per month per account, so in practice every reserved and forgotten IP bills. The definition of "in use" matters too: a static IP associated with a VM counts as in use whether the VM is running or stopped; if the VM is deleted or the IP is dissociated, it becomes "unused" and starts billing at the higher rate.

In the console: VPC network → IP addresses → External IP addresses. Type static in the Filter field and look at the In use by column: the ones with nothing there are reserved and unused.

With the official CLI, gcloud compute addresses list shows each address's status: IN_USE or RESERVED. The pricing documentation uses exactly that command to tell them apart. To keep only the unused external ones:

gcloud compute addresses list \
  --filter="status=RESERVED AND addressType=EXTERNAL" \
  --format="table(name,region.basename(),address,status)"

The command walks every region of the project and the global addresses too; to narrow it down, add --regions=us-central1,southamerica-east1 or --global. Repeat it in every project you have, or use your organization's asset inventory if it is set up.

How to fix it, step by step

Terraform example: a warning on every plan

The google_compute_address resource exposes the users attribute: the URLs of the resources using the address. A check block (Terraform 1.5 or later) evaluates it on every plan and apply and emits a warning if the IP is left with nobody using it, without blocking the deployment. And declaring the IP next to the VM that uses it keeps it from staying reserved when the VM goes away.

variable "region" { type = string }
variable "zone" { type = string }

resource "google_compute_address" "web" {
  name   = "web-ip"
  region = var.region
}

resource "google_compute_instance" "web" {
  name         = "web"
  machine_type = "e2-small"
  zone         = var.zone

  boot_disk {
    initialize_params {
      image = "debian-cloud/debian-12"
    }
  }

  network_interface {
    network = "default"
    access_config {
      nat_ip = google_compute_address.web.address
    }
  }
}

# Warns on every plan if the reserved IP is left unused.
check "ip_estatica_en_uso" {
  assert {
    condition     = length(google_compute_address.web.users) > 0
    error_message = "IP ${google_compute_address.web.address} is reserved and unused."
  }
}

Validated with terraform validate (Terraform 1.17.2, hashicorp/google provider 7.46.2). It is infrastructure as code applied to cost: the condition lives next to the resource and nobody has to remember to check it.

How Control Cloud surfaces it

Control Cloud reads every address with its status and its holders, from the same call gcloud uses. It flags as orphan the reserved one with no holders and also the one marked IN_USE whose holder no longer shows up among the region's VMs, which is the case the console does not show. If the VM list came back empty or failed, it flags nothing: it prefers "unknown" to a false alarm. When releasing from the app, it refuses if the IP still has holders and names them.

When not to apply it

Frequently asked questions

Does Google Cloud charge for a reserved static IP I do not use?

Yes, and more than one in use: in us-central1, USD 0.01 per hour unused versus USD 0.005 in use on a standard VM (network pricing page, 15 November 2026). The free tier covers one hour per month per account.

Does an IP on a stopped VM count as unused?

No. Google considers it in use while it is associated with a VM, running or stopped. It becomes unused when the VM is deleted or the address is dissociated.

Can I get the same IP back after releasing it?

It is not guaranteed. The documentation warns that you might not be able to reserve it again because another user may already have taken it.

Related policies: AWS: release unassociated Elastic IPs · Azure: remove unassociated public IPs · OCI: delete unattached block volumes

Glossary terms: Terraform · Drift · IaC (Infrastructure as Code)

Official sources

  1. Google Cloud — Network pricing (External IP address pricing)
  2. Google Cloud — Reserve, list and release a static external IP address
  3. Terraform — google_compute_address

Ready to see it on your own infrastructure? Book a demo · Read the documentation