Terraform Module Versioning and Semver
Floating git ref module introduced breaking change on Friday deploy.
What broke first on dashboards
Floating git ref module introduced breaking change on Friday deploy.
On-call sees green infrastructure metrics while business KPIs diverge — classic sign the gate is not on the critical path.
Root cause — not the obvious answer
Root cause tied to module sources without version pin—main branch breaks prod.
Terraform modules was treated as a one-time setup task instead of an operational contract with owners and SLOs.
Fix path we kept
Move Terraform modules into the promote path with explicit failure semantics. Add partition-level coverage, not sample-only checks.
Add CI enforcement so misconfigurations cannot merge.
Reference configuration
# terraform-module-versioning — plan-time guard
resource "null_resource" "example" {
triggers = {
validated = var.environment != "prod" || var.approved
}
}
Day-two ownership
Assign a named owner team, review thresholds quarterly, and rehearse rollback.
New hires should execute a safe canary using only the runbook within their first week.
What to do this week
If you only do one thing this week: put Terraform modules on the critical path for one tier-1 workflow and measure what it catches.
Plan review discipline
Every infrastructure PR gets a speculative plan comment, cost delta when available, and policy check output. Reviewers approve the plan — not just the HCL diff. Destroy operations require explicit approval workflow outside normal merge paths.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Handoff to adjacent teams
Terraform pipelines touch ingestion, serving, and finance. Document interfaces where Terraform modules gates hand off to downstream owners so failures are not bounced without context.
Operating Terraform modules at scale
After the first successful deploy of terraform module versioning and semver, most incidents trace to assumptions that stopped being true: traffic doubled, schemas drifted, or credentials rotated without updating consumers. Schedule a quarterly review of Terraform modules settings with the on-call rotation — not only the primary author.
Further reading
- https://developer.hashicorp.com/terraform/docs
- https://developer.hashicorp.com/terraform/language/tests
Frequently asked questions
When should teams prioritize Terraform Module Versioning and Semver?
When consuming internal or public Terraform modules.
What is the most common mistake with Terraform modules?
Module sources without version pin—main branch breaks prod.
Can engineers run apply locally?
Discourage for shared workspaces — CI with plan comments, OIDC, and policy gates. Local plan is fine; local apply without locking is how duplicate VPCs happen.
How do module tests differ from integration tests?
Module tests assert outputs and resource shapes with mock providers; integration tests apply to ephemeral accounts. Both belong in the publish pipeline.
Hiring a senior Android / Flutter engineer?
I architect and ship production mobile software — Kotlin, Jetpack Compose, Flutter — for robotics, EV infrastructure, fintech, and real-time systems. Open to remote roles in Europe and the US.
Get in touch →