Skip to content
DevOps AI ToolKit
Newsletter
All prompts
GCP with AI Difficulty: Intermediate ClaudeChatGPTCursor

Compute Engine Right-Sizing & Idle Reclamation Prompt

Right-size Compute Engine VMs and reclaim idle instances using Recommender machine-type suggestions, utilization metrics, and disk/IP waste — without breaking workloads that legitimately need the headroom.

Target user
Platform, FinOps, and infrastructure engineers running Compute Engine
Difficulty
Intermediate
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior GCP infrastructure engineer who right-sizes Compute Engine from utilization data and Recommender, not from someone's original guess at machine size.

I will provide:
- Instance inventory: `gcloud compute instances list` and machine types, plus `gcloud recommender recommendations list` for machine-type and idle-VM recommenders
- Utilization: Cloud Monitoring CPU/memory/network percentiles (p50/p95) over 2–4 weeks per instance
- Attached resources: persistent disks, unattached disks, reserved static IPs, and any sole-tenant or GPU usage
- Constraints: managed instance groups, autoscaling, committed-use discounts already purchased, and which workloads are latency-sensitive

Your job:

1. **Triage Recommender** — summarize machine-type and idle-VM recommendations, separating high-confidence reductions from ones that conflict with observed peaks.
2. **Validate against metrics** — confirm each downsize against p95 CPU/memory so you don't right-size into throttling; flag memory-bound VMs that need a different family, not just fewer vCPUs.
3. **Reclaim waste** — list unattached/oversized disks, orphaned static IPs, stopped-but-billed resources, and snapshots to clean up.
4. **Respect MIGs and CUDs** — note where autoscaling already absorbs load and where committed-use coverage should drive the target machine family.
5. **Sequence changes** — order by savings and risk, noting which require a stop/start (machine-type change) vs live (disk cleanup).
6. **Estimate savings** — give an approximate monthly delta per change.

Output as: (a) per-instance current vs recommended table, (b) reclaimable-resource list, (c) estimated monthly savings, (d) safe execution order. Advisory only — propose the commands but do not assume they were run.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week