Skip to main content
discount · gcp

GCP Cloud SQL Committed Use Discount Opportunity

resource types
1
rule IDs covered
1
severity
low

What does ZopNight detect here?

Production Cloud SQL instances with at least 60 days of CPU and memory history, uptime at or above 0.70, and utilization of 30% or more qualify for a committed-use discount recommendation. The discount fraction derives only from provider tier rates, with break-even priced at 730 hours per month.

Signal and threshold

How ZopNight evaluates GCP Cloud SQL Committed Use Discount Opportunity.
Field Value
Rule IDsRC-146
Categorydiscount
Severitylow
Metricnone — pure configuration read
Sourcecloudsql_cud.go

Proving an instance is production

  • resource.Name: production pattern (prod, production, live, prd) OR resource.Metadata labels.env/labels.environment/labels.stage/labels.tier == a production value (isProdEnvLabel, reading the nested Metadata[“labels”] object the discoverer’s genericEnrichGCPLabels writes). The name-only gate previously never evaluated a genuinely production instance whose name lacked a prod-like substring; resource.Tags is intentionally not consulted, because the GCP discoverer never populates Tags with customer labels for Cloud SQL, only derived hygiene flags.
  • MetricsAware (EvalContextRule): CloudSQLCPUUtilization + CloudSQLMemoryUtilization over ≥60 days (CommitmentMinHistoryDays). These are exactly the producer-written Cloud SQL names, not the EC2 CPUUtilization/MemoryUtilization the shared ruletypes.CommitmentEligible gate hardcodes, which a Cloud SQL UID never carries (which is why the rule was previously dead). RC-146 runs its own cloudSQLCommitmentEligible gate keyed on these names.
  • TierRatesAware: per-UID tier rates (the only saving basis; absent → abstain)

A discount fraction from tier rates only

concrete-or-abstain (cost-driven discount, commitment mechanism). Commitment-discipline gate first (≥60d history, uptime ≥ CommitmentUptimeEnter 0.70, measured CPU/mem ≥ CommitmentMinUtilPct 30%, fail-closed on every unknown). fraction = model.DeriveCommitmentFraction(tierRates, 0), derived solely from provider-authoritative tier rates (the prior hardcoded 0.40 fallback is removed); fraction <= 0 => abstain. Break-even (CommitmentBreakEven) prices the CUD at 730h/mo vs on-demand on measured running hours: savings = netSavings when it recommends, falls back to the hysteretic uptime gate + cost × fraction when break-even inputs are unavailable. The rule abstains when not prod, no/zero cost, not commitment-eligible, no tier rates, fraction ≤ 0, or break-even says do-not-recommend.

Confirming a full year of runtime

  1. Confirm the instance will run for at least 1 year

CPU and memory over a 60-day lookback

CloudSQLCPUUtilization, CloudSQLMemoryUtilization (≥60-day lookback)

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

417 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

417 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·