google_compute_address cost estimation
A reserved static IP address. Per-hour charge based on attachment state and IP version (IPv4 vs IPv6).
A google_compute_address reserves a static IP. GCP pricing for static IPs depends on whether the IP is in use and the IP version.
IPv4 static IPs:
In use (attached to a running VM or load balancer): $0.004/hour ($2.92/month). GCP started charging for in-use static IPs in 2024 due to IPv4 scarcity.
Reserved but not in use: $0.01/hour ($7.30/month). Higher than the in-use rate to discourage hoarding.
Auto-assigned (ephemeral, not declared): $0.004/hour. Same rate as in-use static IPv4.
IPv6 static IPs: free. GCP has not introduced charges for IPv6.
Global vs regional addresses:
External regional (google_compute_address with no address_type or address_type = "EXTERNAL"): for regional load balancers and VMs. Standard pricing.
External global (with purpose = "VPC_PEERING" or similar global use): for global load balancers (HTTP(S), TCP/SSL proxies). Same per-hour rate.
Internal (address_type = "INTERNAL"): free. Reserved internal IPs in your VPC subnet don't bill.
A typical production setup with one global IPv4 for a global load balancer plus three regional IPv4s for VMs costs about $11.68/month in static IP charges. Modest but not zero.
c3x reads address_type, purpose, and ip_version. For IPv4, the per-hour rate applies. For IPv6 and internal, the resource shows $0.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "google_compute_global_address" "lb" {
name = "production-lb-ip"
address_type = "EXTERNAL"
ip_version = "IPV4"
}
resource "google_compute_address" "nat" {
name = "production-nat-ip"
region = "us-central1"
address_type = "EXTERNAL"
purpose = "GCE_ENDPOINT"
}
# Internal IP - free
resource "google_compute_address" "internal" {
name = "production-internal-ip"
region = "us-central1"
address_type = "INTERNAL"
subnetwork = google_compute_subnetwork.main.id
}Pricing dimensions
What you actually pay for when you provision google_compute_address.
| Dimension | Unit | What's being charged |
|---|---|---|
| In-use IPv4 static IP | per hour | Attached to a running VM or load balancer. $0.004/hour ≈ $2.92/month |
| Reserved but unused IPv4 | per hour | Higher rate to discourage hoarding addresses. $0.01/hour ≈ $7.30/month |
| IPv6 static IP | free | GCP doesn't charge for IPv6 static addresses. $0 |
| Internal static IP | free | Internal IPs in your VPC subnet are free. $0 |
| Ephemeral (auto-assigned) external IPv4 | per hour | Auto-assigned IPs when a VM has a public IP. Same rate as static in-use. $0.004/hour |
Optimization tips
Common ways to reduce google_compute_address cost without changing the workload.
Release unused static IPs
$7.30/month per releasedReserved-but-unused IPv4 is $7.30/month — higher than in-use. Audit google_compute_address resources without an attached instance or LB. Each released IP saves $7.30/month.
Use IPv6 where possible
Per-traffic-shareIPv6 is free. Modern GCP load balancers support dual-stack (IPv4 + IPv6). Clients on IPv6-capable networks bypass IPv4 charges.
Use ephemeral IPs for stateless workloads
Operational simplicityIf a VM doesn't need a stable public IP (it's behind a load balancer with its own static), let GCP auto-assign an ephemeral IP. Same per-hour rate but no separate resource to track.
Consolidate to a global load balancer with one IP
$3-7/month per consolidatedMultiple regional load balancers each need their own IP. A single global load balancer covers all regions with one IP. Saves both static IP cost and load balancer base cost.
FAQ
Why does GCP charge for in-use IPv4 now?
AWS started charging for public IPv4 in February 2024 due to IPv4 address scarcity. GCP followed with similar pricing. The unused IPv4 rate has been there longer, to discourage hoarding addresses.
Does c3x estimate ephemeral IPs?
Ephemeral IPs aren't a separate Terraform resource; they're auto-assigned when a VM has access_config without an explicit nat_ip. c3x estimates them based on the VM's network configuration (presence of access_config with no nat_ip).
Are internal load balancer IPs free?
Internal IPs are free. Internal load balancers themselves have separate pricing (forwarding rule per hour, data processing per GB). The IP isn't the cost driver; the load balancer is.
What about anycast IPs for global load balancers?
Global load balancer IPs are anycast (one IP routed to many regions). Same per-hour rate as a regional static IP. The forwarding rule for the global LB is the main cost, not the IP itself.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including google_compute_address.