Real-time Pricing
MechCloud displays cost information directly in the plan output before any infrastructure changes are applied. This enables cost-aware infrastructure decisions during development rather than discovering costs after deployment.
Overview
When generating an execution plan, MechCloud calculates and displays comprehensive cost information for Azure resources that have associated costs.
Supported Billing Models
Usage-based (hourly)
Hourly rate + max monthly total (730 hours)
Virtual Machines, Load Balancers, Public IPs
Storage (GB-month)
Monthly rate + total when size is known
Managed Disks (Premium SSD, Standard SSD, Standard HDD)
Consumption-based
Rate only (actual usage unknown at plan time)
Data transfer, Storage transactions, Bandwidth
Usage-Based Charges (Price + Cost)
For resources with predictable usage patterns, MechCloud shows both price rates and calculated costs:
Virtual Machine compute hours
Public IP address hours
Load Balancer hours
Managed Disk storage (GB-Mo)
Example: A Standard_B1s VM shows price: $0.01040/Hrs, monthly: $7.59
Azure Spot Pricing: For all regular Virtual Machines, MechCloud displays both regular and spot pricing in the plan output. This helps users evaluate potential cost savings by using spot instances when suitable for their workloads.
Example: vm1 (action: create, price: $0.01040/Hrs, monthly: $7.59, spot-price: $0.00312/Hrs, spot-monthly: $2.28)
Consumption-Based Charges (Price Only)
For resources with variable consumption, MechCloud shows pricing rates but cannot calculate costs without actual usage data:
Data transfer (GB)
Storage transactions
Bandwidth usage
Application Gateway data processing
Example: Storage account transaction pricing shown as Price (Transactions - price: $0.0004/10K transactions)
Cost Change Tracking
MechCloud displays cost change percentages for all resource actions, helping you understand the financial impact of infrastructure changes.
Create Actions
When creating new resources, the cost change is +100% (from $0 to the new cost):
Update Actions
When modifying existing resources, the change percentage reflects the actual cost difference.
Example: Resizing a VM from Standard_B2s to Standard_B1s
The -50% change indicates a 50% cost reduction from the previous Standard_B2s configuration.
Example: Upgrading disk from Standard HDD to Premium SSD
The +150% change shows the cost increase from Standard HDD to Premium SSD tier.
Delete Actions
When deleting resources, the cost change is -100% (from current cost to $0):
Plan Output Examples
Virtual Machine (Usage-Based Charges)
Virtual Machines have predictable usage patterns, so MechCloud calculates and displays actual hourly and monthly costs.
Creating a regular Virtual Machine:
Plan output:
The plan shows:
Regular price:
$0.01040/Hrs- calculated hourly cost for Standard_B1s VMRegular monthly:
$7.59- estimated monthly cost (hourly × 730 hours)Spot price:
$0.00312/Hrs- spot instance hourly cost for comparisonSpot monthly:
$2.28- estimated monthly spot costOS Disk:
$1.54/month- Standard HDD S4 tier (32GB)Change:
+100%- new resource, going from $0 to $7.59/month
Key Feature: MechCloud displays spot pricing alongside regular pricing for all Virtual Machines. This encourages users to evaluate spot instances when suitable for their workloads, potentially saving up to 70-90% on compute costs.
Creating a spot Virtual Machine:
Plan output:
For spot instances, only spot pricing is shown since the VM will use spot capacity. The +100% change indicates a new resource.
Managed Disk (Storage-Based Charges)
Managed Disks demonstrate storage-based pricing where costs are calculated based on the provisioned tier size.
Creating a Premium SSD Managed Disk:
Plan output:
The plan shows:
Monthly cost:
$19.71- Premium SSD P10 tier (128GB capacity)Tier: P10 - Azure automatically maps 128GB to P10 tier
Change:
+100%- new resource
Azure Disk Tier Mapping: Azure Managed Disks use fixed-size tiers. When you specify disk_size_gb: 128, Azure provisions a P10 disk (128GB capacity) and charges the P10 tier rate, not a per-GB rate.
Creating a Standard SSD Managed Disk:
Plan output:
The Standard SSD E15 tier (256GB) costs $19.20/month, significantly less than Premium SSD for workloads that don't require premium performance.
Public IP Address (Usage-Based Charges)
Public IP addresses have hourly charges based on SKU type.
Creating a Basic Public IP:
Plan output:
Creating a Standard Public IP:
Plan output:
Standard SKU costs more but provides additional features like zone redundancy and static allocation.
Load Balancer (Usage-Based Charges)
Load Balancers have hourly charges based on SKU type.
Creating a Basic Load Balancer:
Plan output:
Creating a Standard Load Balancer:
Plan output:
Supported Resources
MechCloud provides real-time pricing for a comprehensive set of Azure resource types including compute, storage, networking, and other services.
For the complete list of supported resources with pricing examples, see Examples (Resources With Cost).
Regional Pricing
Costs vary by Azure region. MechCloud automatically applies region-specific pricing.
Example - Standard_B1s pricing:
Using Pricing Data
Compare Configurations
Compare Disk Types
Track Environment Costs
When generating plans for different Resource Contexts:
Document Cost Decisions
Example Workflow
This example demonstrates how real-time pricing helps optimize infrastructure costs during development.
Initial Configuration
When you generate a plan, MechCloud shows costs for each resource. You can then adjust VM sizes and disk types to optimize costs before deploying.
Cost Optimization
By reviewing the pricing information in the plan:
Resize compute: Change
Standard_D2s_v3toStandard_B2sto reduce VM costsAdjust disk type: Change from Premium SSD to Standard SSD if performance allows
Consider spot: Evaluate spot instances for non-critical workloads
Each configuration change generates a new plan showing updated costs, enabling iterative optimization before any resources are created.
Best Practices
Include cost justification in code comments - Document why specific VM sizes or disk types were chosen.
Compare costs during code review - Review cost deltas alongside configuration changes.
Track cost trends over time - Save plan outputs to monitor infrastructure cost evolution.
Use Resource Context for cost isolation - Separate cost tracking by environment (dev, staging, prod).
Monitor actual vs estimated costs - Compare MechCloud estimates against actual Azure bills to refine understanding.
Understand disk tier pricing - Azure charges by tier (P10, E15, S20), not exact GB size.
Evaluate spot instances - Review spot pricing for workloads that can tolerate interruptions.
Azure-Specific Considerations
Disk Tier Pricing
Unlike per-GB pricing, Azure Managed Disks use fixed-size tiers:
Premium SSD Tiers:
P4 (32GB) - $6.40/month
P6 (64GB) - $12.29/month
P10 (128GB) - $19.71/month
P15 (256GB) - $38.40/month
P20 (512GB) - $75.78/month
Standard SSD Tiers:
E4 (32GB) - $2.40/month
E6 (64GB) - $4.80/month
E10 (128GB) - $9.60/month
E15 (256GB) - $19.20/month
E20 (512GB) - $38.40/month
Standard HDD Tiers:
S4 (32GB) - $1.54/month
S6 (64GB) - $3.01/month
S10 (128GB) - $5.89/month
S15 (256GB) - $11.52/month
S20 (512GB) - $22.53/month
When you specify disk_size_gb: 100, Azure provisions the next tier up (e.g., P10 for 128GB) and charges the tier rate.
VM Spot Pricing
Azure Spot VMs can save up to 90% compared to regular pricing, but can be evicted when Azure needs capacity. Best for:
Batch processing jobs
Development/test environments
Stateless workloads
Interruptible computations
Regional Price Variations
Azure pricing varies significantly by region. Examples for Standard_B1s:
East US: $0.01040/Hr
West Europe: $0.01144/Hr
Southeast Asia: $0.01248/Hr
Always check pricing for your target region during planning.
Integration with Stateless IaC
Real-time pricing works seamlessly with MechCloud's stateless architecture:
Fresh pricing every plan - No stale data from state files
Accurate cost deltas - Costs compared against actual current state
Environment isolation - Resource Context enables per-environment cost tracking
Next Steps
Last updated