Multi-CloudPowerShellPythonCost Optimization

🍳 Multi-Cloud Dev/Test Cost Chef: Comprehensive Audit Suite

Hunt down cost optimization opportunities across AWS, Azure, GCP, and OCI dev/test environments

Tool Type: Script Collection | Cloud Providers: AWS, Azure, GCP, OCI | Difficulty: Intermediate

What This Recipe Cooks Up

This CloudCostChefs audit suite is your complete multi-cloud cost detective for dev/test environments. It hunts down resources across AWS, Azure, GCP, and OCI that are oversized, using premium features, missing automation, or simply forgotten and abandoned.

Perfect for FinOps teams managing multi-cloud environments who need to identify 20-60% cost savings opportunities in non-production workloads. Get both CSV data and beautiful CloudCostChefs-styled HTML reports for each cloud provider.

✅ What You'll Discover

  • Premium SKUs and tiers in dev/test environments
  • Oversized VMs and compute instances
  • Resources missing automation tags and scheduling
  • Orphaned storage volumes and disks
  • Unused network resources (IPs, load balancers)
  • Permissive security configurations

🎯 Perfect For

  • FinOps teams managing multi-cloud environments
  • Cloud architects standardizing optimization practices
  • DevOps engineers implementing automation
  • Finance teams tracking non-prod spending
  • Organizations with large cloud footprints
  • Teams preparing for cost optimization initiatives

🌥️ Multi-Cloud Coverage

Azure

  • PaaS Premium SKUs - App Services, SQL Databases, Redis
  • VMs Missing Auto-Tags - No stop/start automation
  • Oversized VMs - Large VM sizes for dev/test
  • Orphaned Disks - Unattached managed disks
  • Missing Expiration Tags - No cleanup automation
  • Unused Public IPs - Static IPs not attached
  • Permissive Security Groups - Overly broad access

AWS

  • RDS Production Sizes - Large database instances
  • EC2 Missing Tags - No scheduling automation
  • Oversized EC2 Instances - Large types for dev/test
  • Unattached EBS Volumes - Orphaned storage
  • Unused Elastic IPs - Static IPs without assignments
  • Premium ElastiCache - High-performance cache
  • Empty Load Balancers - ALBs/NLBs with no targets
  • Permissive Security Groups - 0.0.0.0/0 access

GCP

  • Cloud SQL Production Sizes - Large database tiers
  • Missing Automation Labels - No scheduling
  • Oversized Compute Instances - Large machine types
  • Unattached Persistent Disks - Orphaned storage
  • Unused Static IPs - Reserved IPs without use
  • Premium Memorystore - High-availability cache
  • Empty Load Balancers - No backends configured
  • Permissive Firewall Rules - Broad internet access

OCI

  • Database Production Shapes - Large DB instances
  • Missing Automation Tags - No scheduling
  • Oversized Compute Instances - Large shapes
  • Unattached Block Volumes - Orphaned storage
  • Unused Public IPs - Reserved IPs without use
  • Empty Load Balancers - No backends configured
  • Permissive Security Lists - Broad access rules

🛠️ Prerequisites & Setup

Azure & AWS Requirements

# Install required PowerShell modules
Install-Module -Name Az.Accounts -Force
Install-Module -Name Az.Resources -Force
Install-Module -Name AWS.Tools.Common -Force
Install-Module -Name AWS.Tools.EC2 -Force
Install-Module -Name AWS.Tools.RDS -Force

Permissions: Read-only access to resources, tags, and cost data

GCP & OCI Requirements

# GCP PowerShell setup
Install-Module -Name GoogleCloud -Force
# OCI Python requirements
pip install oci pandas jinja2 matplotlib

Permissions: Viewer role for GCP, Read permissions for OCI

📖 Usage Examples

Azure Usage

# Run Azure audit with default settings
.\Azure-DevTest-CostChef.ps1 -OutputPath "C:\Reports"

Scans your current Azure subscription for dev/test resources and saves reports to specified directory.

AWS Usage

# Run AWS audit for specific region
.\AWS-DevTest-CostChef.ps1 -Region "us-west-2" -OutputPath "C:\Reports"

Audits AWS resources in the specified region and generates detailed reports.

GCP Usage

# Run GCP audit for specific project
.\GCP-DevTest-CostChef.ps1 -Project "my-dev-project" -OutputPath "C:\Reports"

Scans a specific GCP project for optimization opportunities and generates reports.

OCI Usage

# Run OCI audit for specific compartments
python OCI-DevTest-CostChef.py --output-path ./reports --compartments "ocid1.compartment..."

Audits specified OCI compartments and generates Python-based reports.

🎯 Key Features Across All Scripts

🔍 Smart Detection

  • Tag/Label-Based Filtering - Only scans resources tagged as dev/test
  • Cost Impact Analysis - Focuses on resources with highest cost impact
  • Automation Gap Detection - Identifies missing auto-shutdown configurations

📊 Rich Reporting

  • CSV Exports - Machine-readable data for further analysis
  • Beautiful HTML Reports - Executive-ready presentations
  • Cloud-Specific Styling - Each script matches cloud provider branding
  • Actionable Recommendations - Specific cost-saving suggestions

🔄 Unified Approach

  • Common Methodology - Same approach across all cloud providers
  • Unified Branding - CloudCostChefs theme throughout
  • Consistent Output Format - Similar report structures
  • Scalable Architecture - Easy to extend with new checks

💰 Expected Cost Savings

These scripts typically identify 20-60% cost savings in dev/test environments by finding:

Oversized resources
30-50% savings through right-sizing VMs, databases, and other compute resources
Zombie resources
100% savings through cleanup of orphaned disks, unused IPs, and empty load balancers
Missing automation
40-70% savings through scheduling and auto-shutdown of non-production resources
Premium features
20-40% savings through tier optimization and removal of unnecessary premium features

⚠️ Common Issues & Warnings

Large Environment Performance

For very large environments (1000+ resources), scripts may take 10+ minutes to run. Consider filtering by resource groups or projects.

Authentication Timeouts

For long-running scans, cloud provider authentication may time out. Use service principals or refresh credentials before running.

Custom Tag Schemes

If your organization uses non-standard tagging schemes, modify the scripts' tag detection logic to match your conventions.

🚀 Getting Started Checklist

Step 1: Preparation

  • Clone the repository from GitHub
  • Install required modules for your cloud providers
  • Configure authentication for each cloud
  • Create output directory for reports

Step 2: Execution

  • Run scripts for each cloud provider
  • Review HTML reports for findings
  • Export CSV data for further analysis
  • Implement recommended optimizations

🔄 Integration Options

🔄 CI/CD Pipeline

Run these scripts as part of your CI/CD pipeline to catch cost issues before they reach production.

  • GitHub Actions integration
  • Azure DevOps pipeline tasks
  • Jenkins job templates

📊 Dashboard Integration

Feed the CSV outputs into your existing dashboards and BI tools.

  • Power BI templates
  • Grafana dashboards
  • Excel reporting

🤖 Automation

Schedule regular runs and automate remediation actions.

  • Scheduled task execution
  • Email report distribution
  • Ticket creation for findings

Ready to Optimize Your Dev/Test Environments?

Download the Multi-Cloud Dev/Test Cost Chef suite and start identifying 20-60% cost savings opportunities today.