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.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More GCP with AI prompts & error guides

Browse every GCP with AI prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.