Contents
GCP 料金改定と最新割引制度(2024 年版)
ポイント
Google Cloud の公式ドキュメントに基づく、2023‑12 以降の主要な価格変更と割引制度を整理しました。
| 項目 | 主な変更点 | 参考リンク |
|---|---|---|
| Committed Use Discount(CUD) | - 対象サービスが Compute Engine・Kubernetes Engine·BigQuery·Cloud SQL·Vertex AI に拡大 - 1 年契約で最大 57 %、3 年契約で最大 65 % の割引が適用可能(サービス別上限は異なる) |
【1】 |
| Sustained Use Discount(SUD) | - 使用率 25 % 超過時に自動適用。標準割引率は 30 %、2024 年 12 月のアップデートで Cloud Run 等一部サービスが最大 35 % に拡大 | 【2】 |
| リージョン横断 CUD(Global CUD) | - 同一契約で複数リージョンのリソースをまとめて割引対象に。2025 年 4 月にベータ開始、2026 年正式提供予定 | 【3】 |
| 新しい SUD 対象サービス | - Dataflow, Dataproc, Cloud Run for Anthos が追加され、利用率が 60 % 超えると約 40 % の割引が適用(上限は 45 %) | 【4】 |
※「最大 57 %」や「40 % 前後」の数値は、Google が公開している “Maximum discount rates per service” 表に基づくものです。実際の割引率は選択したサービス・期間・使用量によって変動します。
1. CUD と SUD の実務適用例
1‑1. CUD(Global CUD)活用シナリオ
- 対象:米国 (us‑central1) と欧州 (europe‑west1) に跨る VM ファミリー
- 手順
- Cloud Console の “Committed use contracts” ページで「Create commitment」を選択。
- 「Global」オプションを有効化し、対象リソース(vCPU・メモリ)と期間(1 年 or 3 年)を入力。
- 契約完了後、リージョン別にデプロイした VM が自動的に同一割引率で課金されます。
効果:Compute Engine の標準 CUD(リージョン限定)では最大 57 % 割引ですが、Global CUD でも同等の上限が適用できるため、複数リージョンに跨るマルチクラウド戦略でコスト最適化が可能です【1】。
1‑2. SUD の自動適用例(Dataflow)
|
1 2 3 4 5 6 7 8 |
# dataflow_job.yaml (example) name: my-dataflow-job type: Dataflow environment: tempLocation: gs://my-bucket/tmp/ maxWorkers: 10 autoscalingAlgorithm: THROUGHPUT_BASED |
- 利用率が 60 % 超えると、Dataflow の実行時間に対して 約 40 %(上限 45 %)の割引が自動付与されます【4】。
- 確認方法:Billing → “Cost breakdown” の「Sustained Use Discount」列で適用率をリアルタイムにチェックできます。
2. Google Cloud Recommender と AI 自動最適化
2‑1. Recommender 有効化手順
| 手順 | 操作画面 |
|---|---|
| ① Console → IAM & Admin → Recommender | ![]() |
| ② プロジェクトを選択し、Compute Engine Rightsizing, Cloud SQL, BigQuery のスイッチをオン | — |
| ③ 「Recommendations」タブで提案一覧が表示される | — |
2‑2. AI ベースの Cost Optimization API(Vertex AI カスタムジョブ)
公式ドキュメント:https://cloud.google.com/vertex-ai/docs/general/custom-jobs
|
1 2 3 4 5 6 |
gcloud beta ai custom-jobs create \ --region=us-central1 \ --display-name="cost-optimization" \ --worker-pool-spec=machine-type=n1-standard-4,replica-count=1,container-image-uri=gcr.io/cloud-aiplatform/prediction:latest \ --args='--project=my-gcp-project,--start-date=2023-01-01,--end-date=2023-12-31' |
- 出力先は Cloud Storage バケットに JSON 形式で保存し、後続の Terraform モジュールへインプット可能です。
- API の予測精度は最低 90 日分 のメトリクスが必要です(公式ガイド参照)【5】。
3. 未使用リソースの検出と安全な削除フロー
3‑1. Cloud Asset Inventory の有効化
|
1 2 |
gcloud asset inventory enable --project=my-gcp-project |
- インベントリは BigQuery テーブル
asset_inventory.assetsに自動エクスポートできます(エクスポート設定は Billing → Export から)【6】。
3‑2. 未使用 VM の抽出クエリ例
|
1 2 3 4 5 6 7 8 |
SELECT name, location, json_extract_string(resource.data, "$.status") AS status FROM `my-bq-dataset.asset_inventory.assets` WHERE asset_type = 'compute.googleapis.com/Instance' AND json_extract_string(resource.data, '$.status') = 'TERMINATED'; |
3‑3. 自動削除パイプライン(Python + Cloud Scheduler)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import google.cloud.compute_v1 as compute from datetime import datetime def delete_terminated_instances(project: str, zone: str): client = compute.InstancesClient() for instance in client.list(project=project, zone=zone): if instance.status == "TERMINATED": # 事前にスナップショット取得(任意) print(f"[{datetime.utcnow()}] Deleting {instance.name}") client.delete(project=project, zone=zone, instance=instance.name) # Cloud Scheduler → Pub/Sub → Cloud Function で毎日 02:00 に実行 |
安全策
- ラベルフィルタ:env=dev のみ対象に限定。
- 承認ステップ:削除前に Pub/Sub メッセージを Slack/メールへ送信し、手動で yes を返信したら Cloud Build の手動トリガーで実行。
4. Compute Engine・ストレージ・ネットワークのコスト最適化実践
| カテゴリ | 手法 | 効果(目安) | 公式ドキュメント |
|---|---|---|---|
| Compute | Rightsizing + カスタムマシンタイプ | 15 %〜30 % 削減 | 【7】 |
| Compute | Preemptible (Spot) VM | オンデマンドの約 70 % 割引 | 【8】 |
| Storage | ライフサイクルポリシー(Standard→Nearline→Coldline) | アクセス頻度に応じたコスト最適化 | 【9】 |
| Network | 同一リージョン VPC Peering | 内部トラフィックは無料化 | 【10】 |
| Network | Cloud CDN エッジキャッシュ活用 | egress コスト最大 40 % 削減 | 【11】 |
4‑1. Rightsizing とカスタムマシンタイプの流れ
|
1 2 3 4 5 6 7 8 9 |
# Recommender の提案取得 gcloud recommender recommendations list \ --recommender=google.compute.instance.MachineTypeRecommender \ --project=my-gcp-project # 推奨に従いカスタムタイプへ変更(例:4 vCPU / 8 GB RAM) gcloud compute instances set-machine-type my-instance \ --machine-type=custom-4-8192 |
4‑2. Preemptible VM の導入ポイント
| 項目 | 推奨設定 |
|---|---|
| 対象ワークロード | バッチ処理、CI/CD ワーカー、データ変換ジョブ等の中断許容タスク |
| 起動スクリプト | preemptible-termination-notice を検知し、作業状態を Cloud Storage に保存 |
| SLA | 保証なし(最大 24 時間で停止)ので、ステートレス設計が必須 |
4‑3. ストレージ階層化の自動化例
|
1 2 |
gsutil lifecycle set lifecycle.json gs://my-bucket |
lifecycle.json のサンプル(Standard → Nearline → Coldline):
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
{ "rule": [ { "action": {"type":"SetStorageClass","storageClass":"NEARLINE"}, "condition":{"age":30} }, { "action": {"type":"SetStorageClass","storageClass":"COLDLINE"}, "condition":{"age":365} } ] } |
5. 予算管理・レポート自動化と IaC(Terraform)による割引適用
5‑1. 予算アラート設定
| 手順 | 操作 |
|---|---|
| ① Console → Billing → Budgets & alerts | 「Create budget」 |
| ② 月額上限 ¥5,000,000、閾値 50 % / 80 % を設定 | 通知先は Email と Slack(Pub/Sub 経由) |
③ Export → BigQuery データセット billing_export に課金情報を自動転送 |
【12】 |
5‑2. Terraform で CUD 自動作成
|
1 2 3 4 5 6 7 8 9 10 11 12 |
# google_compute_commitment (CUD) の例 resource "google_compute_commitment" "cud_1y" { name = "cud-1year" plan = "TWELVE_MONTH" type = "COMPUTE_ENGINE" resources = [ { amount = 2000, type = "VCPU" }, # vCPU 数 { amount = 8192, type = "MEMORY" } # メモリ (MiB) ] } |
- 適用対象は
google_compute_instanceのmachine_typeと自動で紐付くため、手作業のミスが排除されます【13】。
5‑3. Rightsizing モジュールと CI/CD パイプライン
|
1 2 3 4 5 |
module "rightsized_instances" { source = "./modules/rightsizing" instances = data.google_compute_instance_list.all.instances } |
- GitHub Actions の例(週次実行):
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
name: Weekly Rightsizing on: schedule: - cron: '0 3 * * MON' # 毎週月曜 03:00 UTC jobs: terraform: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Terraform uses: hashicorp/setup-terraform@v2 - run: terraform init - run: terraform plan -out=plan.out - run: terraform apply -auto-approve plan.out |
5‑4. 実装事例(匿名企業)
| 業種 | 導入項目 | 削減率 | 年間削減額 (概算) |
|---|---|---|---|
| SaaS プラットフォーム | Recommender + Terraform CUD 自動付与 | 28 % | 約 USD 120,000 |
| 製造業 IoT 基盤 | 未使用リソース自動削除、Preemptible バッチ | 22 % | 約 USD 85,000 |
- 両社ともに FinOps プロセス(可視化 → 改善 → ループ)を導入し、支出の 95 % をリアルタイムで把握できました【14】。
まとめ
- 最新公式情報(2024‑12 更新)に基づき、CUD と SUD の対象サービス・割引率が拡大しました。
- Global CUD によりリージョン横断のリソースでも同一契約で最大 57 % 割引が可能です。
- Recommender + Vertex AI の組み合わせで、権限付与から自動最適化までをコード化し、運用負荷を大幅削減できます。
- 未使用リソースは Cloud Asset Inventory とスクリプト で安全に検出・削除し、無駄な課金を根絶します。
- Compute Engine の Rightsizing、カスタムマシンタイプ、Preemptible VM、ストレージ階層化、VPC Peering を組み合わせると総合で 20 %〜35 % のコスト削減が実現します。
- 予算アラート+BigQuery Export+Terraform による CUD 自動付与 で、割引適用漏れや過剰プロビジョニングを防ぎつつ、FinOps サイクルを自動化できます。
次のステップ
1. 各サービスの公式 Pricing ページ(下記リファレンス)を確認し、自組織に最適な割引タイプを選定。
2. Recommender と Cloud Asset Inventory を有効化し、週次レビューのルーチンを作成。
3. Terraform のgoogle_compute_commitmentリソースで CUD をコード化し、CI/CD に組み込む。
参考リンク(公式ドキュメント)
-
Committed Use Discounts – Google Cloud Pricing
https://cloud.google.com/compute/docs/instances/cuds -
Sustained Use Discounts – Google Cloud Billing docs
https://cloud.google.com/billing/docs/how-to/sustained-use-discounts -
Global Committed Use Contracts (Beta) – Release notes 2025‑04
https://cloud.google.com/compute/docs/commitments/global-committed-use -
Dataflow Sustained Use Discount – Update 2024‑12
https://cloud.google.com/dataflow/pricing#sustained_use_discount -
Vertex AI Custom Jobs – Cost Optimization example
https://cloud.google.com/vertex-ai/docs/general/custom-jobs -
Cloud Asset Inventory – Export to BigQuery guide
https://cloud.google.com/asset-inventory/docs/export-to-bigquery -
Rightsizing Recommendations – Recommender API reference
https://cloud.google.com/recommender/docs/compute-engine-rightsize -
Preemptible VM pricing – Spot VMs documentation
https://cloud.google.com/compute/docs/instances/preemptible -
Storage lifecycle management – Google Cloud Storage docs
https://cloud.google.com/storage/docs/lifecycle -
VPC Peering pricing – Network Service Tiers
https://cloud.google.com/vpc/docs/vpc-peering#pricing -
Cloud CDN pricing – Egress cost reduction
https://cloud.google.com/cdn/pricing -
Exporting billing data to BigQuery – Billing documentation
https://cloud.google.com/billing/docs/how-to/export-data-bigquery -
Terraform Provider: google_compute_commitment – Registry reference
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_commitment -
FinOps guide (Google Cloud) – Best practices 2024
https://cloud.google.com/blog/topics/finops
