en un clic
gcp-cost-optimizer
Analyzes GCP costs and provides optimization recommendations including committed use discounts, rightsizing, and unused resources. Use when optimizing GCP spending or analyzing GCP costs.
Menu
Analyzes GCP costs and provides optimization recommendations including committed use discounts, rightsizing, and unused resources. Use when optimizing GCP spending or analyzing GCP costs.
Creates and validates Azure Resource Manager (ARM) templates for infrastructure deployment. Use when creating ARM templates, deploying Azure infrastructure as code, or validating Azure templates.
Analyzes Azure costs and provides optimization recommendations including reserved instances, rightsizing, and unused resources. Use when optimizing Azure spending or analyzing Azure costs.
Creates dbt models with proper layering (staging, marts), incremental strategies, and documentation. Use when creating dbt models, organizing data transformations, or implementing incremental models.
Generates dbt tests including schema tests, data quality tests, and freshness checks. Use when adding tests to dbt models or implementing data quality validation.
Configures Google Cloud Build pipelines with caching, parallel builds, and optimization. Use when setting up Cloud Build, optimizing build performance, or configuring CI/CD pipelines.
Create custom GitHub Actions (composite, Docker, or JavaScript). Use when building reusable actions, creating custom workflow steps, or packaging logic for distribution. Trigger words include "create action", "custom action", "build action", "composite action", "Docker action".
| name | gcp-cost-optimizer |
| description | Analyzes GCP costs and provides optimization recommendations including committed use discounts, rightsizing, and unused resources. Use when optimizing GCP spending or analyzing GCP costs. |
Analyze GCP costs and implement optimization strategies to reduce spending.
# View billing data
gcloud billing accounts list
# Export billing data to BigQuery
gcloud billing accounts projects link PROJECT_ID \
--billing-account=BILLING_ACCOUNT_ID
# Query costs
bq query --use_legacy_sql=false \
'SELECT service.description, SUM(cost) as total_cost
FROM `project.dataset.gcp_billing_export`
WHERE DATE(_PARTITIONTIME) >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY service.description
ORDER BY total_cost DESC'
Committed Use Discounts:
Sustained Use Discounts:
Preemptible VMs:
Rightsizing:
# Get rightsizing recommendations
gcloud recommender recommendations list \
--project=PROJECT_ID \
--location=us-central1 \
--recommender=google.compute.instance.MachineTypeRecommender
# Apply recommendation
gcloud recommender recommendations mark-claimed \
RECOMMENDATION_ID \
--project=PROJECT_ID \
--location=us-central1 \
--recommender=google.compute.instance.MachineTypeRecommender