Cloud Cost Optimization
Multi-Cloud Cost Management
Terraform Cost Estimation
provider "infracost" {}
resource "aws_instance" "web_servers" {
count = var.environment == "prod" ? 3 : 1
instance_type = var.environment == "prod" ? "t3.medium" : "t3.micro"
tags = {
Environment = var.environment
CostCenter = "web-${var.environment}"
}
}FinOps Integration
Cost Reporting Pipeline
name: Cost Analysis
on:
schedule:
- cron: '0 1 * * *'
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Infracost
uses: infracost/infracost-action@v3
with:
api-key: ${{ secrets.INFRACOST_API_KEY }}
terraform-dir: infrastructure/
- name: Post Cost Report
run: |
curl -X POST ${{ secrets.SLACK_WEBHOOK }} \
-H 'Content-Type: application/json' \
--data @infracost-report.jsonCost Controls
AWS Budget Alert
Best Practices
Last updated