Menu

1 / 3

I built a carbon linter for Terraform PRs — here's the full stack

DEV Community·Grafikui·6 months ago
#DSufe4fb
#it#devops#terraform#sustainability#greenops
Reading 0:00
15s threshold

Most cloud sustainability tools are built for sustainability officers.

They pull three-month-old billing data, run it through a proprietary model, and produce a PDF that engineers never see.

By the time you know your us-east-1 cluster emits twice as much as us-west-2 would have, it's been running for a quarter. The architecture is locked in. The carbon is already burnt.

The only moment you can actually change what gets deployed is the pull request.

So I built a tool that lives there.

What GreenOps CLI does

It's a GitHub Action that reads a terraform show -json plan output and posts a carbon and cost diff directly on the PR, across AWS, Azure, and GCP, before anyone clicks merge.

Here's what it posted on a real PR this week:

🌱 GreenOps Infrastructure Impact

Metric Monthly Total Scope 2 — Operational 21.23 kg CO₂e Scope 3 — Embodied 4.17 kg CO₂e Total Lifecycle 25.40 kg CO₂e Water Consumption 22.5 L Infrastructure Cost $280.32/month

Potential savings: −20.75 kg CO₂e/month (97.7%) 💡 3…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.