
Right-Size or Pay the Price 📏 VM SKU Optimization Strategy with Terraform
That D8s_v5 running at 12% CPU is costing you 4x what you need. Here's how to use Azure Advisor data, build a workload-to-SKU mapping module in Terraform, and stop over-provisioning VMs across every environment. An audit of 40 Azure VMs across three environments reveals: average CPU utilization is 11%, average memory usage is 23%. Half the fleet is running D4s_v5 (4 vCPU, 16 GB) when a B2s (2 vCPU, 4 GB) would handle the workload fine. The overspend: $2,100/month. Annual waste: $25,200 - from just 40 VMs. 📏 Here's the pricing reality for common Azure VM sizes (Linux, East US, pay-as-you-go): Standard_D8s_v5 8 vCPU, 32 GB $0.384/hr $280/month Standard_D4s_v5 4 vCPU, 16 GB $0.192/hr $140/month Standard_D2s_v5 2 vCPU, 8 GB $0.096/hr $70/month Standard_B2s 2 vCPU, 4 GB $0.042/hr $31/month Standard_B2ms 2 vCPU, 8 GB $0.083/hr $61/month A single VM running D4s_v5 at 12% CPU wastes roughly $109/month compared to a B2ms that could handle the same load. Multiply that across a fleet and you're l
Continue reading on Dev.to DevOps
Opens in a new tab


