Skip to content

feat(gcp): add External IP catalog pricing (RC3-023a, #76) - #91

Merged
x7even merged 2 commits into
mainfrom
rc3-023a-gcp-external-ip
Jul 6, 2026
Merged

feat(gcp): add External IP catalog pricing (RC3-023a, #76)#91
x7even merged 2 commits into
mainfrom
rc3-023a-gcp-external-ip

Conversation

@x7even

@x7even x7even commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds GCP External IP pricing (network/external_ip) to DescribeCatalog, closing the zero-catalog-entry gap for issue RC3-023a (P2, LOWEST-RISK — needs live GCP catalog access): GCP External IP has zero catalog entry #76.
  • Rates are live-verified against the Cloud Billing Catalog API and cross-checked against cloud.google.com/vpc/network-pricing:
    • Standard/on-demand VM: $0.005/hr (SKU C054-7F72-A02E, global scope)
    • Spot/preemptible VM: $0.0025/hr (SKU 4AF8-7C1F-39C4, global scope)
  • Reserved-but-unattached Static IP charges (per-region, ~38 SKU variants) are intentionally out of scope — a different billing question from an attached external IP; documented in the commit for future reference.
  • Reviewed via a high-effort 8-angle /code-review pass; all 6 surviving findings (fragile exact-string SKU matching, a duplicated tier-parsing helper, a redundant double-check, and a missing rate cache) were fixed in a follow-up commit.

Test plan

  • go build ./..., go vet ./..., go test ./... -count=1 — all packages pass
  • 6 new tests covering standard/spot rate extraction, fallback, cost math, and dispatcher wiring, plus a cache-hit test added during the review-fix pass

Closes #76.

x7even added 2 commits July 6, 2026 07:42
Live-verified against Cloud Billing Catalog API + cloud.google.com/vpc/network-pricing:
- External IP Charge on a Standard VM (C054-7F72-A02E): $0.005/hr, global
- External IP Charge on a Spot Preemptible VM (4AF8-7C1F-39C4): $0.0025/hr, global

Reserved-but-unattached Static IP charges (per-region, ~38 SKU variants) are
intentionally out of scope -- a different billing question from an attached
external IP.
- Match SKU descriptions via case-insensitive substring (consistent with
  every other matcher in this file) instead of brittle exact string equality
- Remove skuLastNonZeroTierPrice; dispatch to the existing skuPaidPrice/
  skuPrice helpers by known vmType instead of a duplicate tier-walker
- Collapse redundant rate==0 double-check in the fallback path
- Cache the derived standard/spot rates (fetchExternalIPRates) so a caller
  requesting both terms doesn't re-unmarshal/re-scan the full SKU catalog
@x7even
x7even merged commit 705aa8a into main Jul 6, 2026
1 check passed
@x7even
x7even deleted the rc3-023a-gcp-external-ip branch July 6, 2026 08:03
@x7even x7even mentioned this pull request Jul 9, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RC3-023a (P2, LOWEST-RISK — needs live GCP catalog access): GCP External IP has zero catalog entry

1 participant