liveBook · Manning

Semantic versioning

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

Semantic versioning is a version-numbering scheme in which major, minor, and patch components communicate the kinds of changes between releases.

Semantic versioning assigns major, minor, and patch numbers that communicate the significance of configuration changes between module releases. section 5.2

Apply the version components consistently:

  • Increment the major version for significant changes that remove inputs, outputs, or resources. section 5.2
  • Increment the minor version for configuration, input, or output changes that do not affect dependencies using earlier versions. section 5.2
  • Increment the patch version for minor configuration-value changes limited to the module and its resources. section 5.2

Database module migration

A database module changes from v1.0.0 to v2.0.0 after removing its password output and exposing a secrets-manager path instead. Downstream infrastructure must retrieve the password before creating the database. section 5.2

$ git log --oneline
7157d3e (HEAD -> main, tag: v2.0.0, origin/main) 
➥Change database module to store password in secrets manager
5c5fd65 (tag: v1.0.0) Add database factory module

A Git history makes releases auditable by showing the commits associated with v1.0.0 and v2.0.0. section 5.2

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Defines major, minor, and patch changes, then stops short of a full specification of semantic-versioning approaches.
Examples
Uses a database module that moves a password into a secrets manager, alongside Git tags and release history.
What it assumes
Builds on infrastructure-as-code modules, downstream dependencies, and basic version-control operations.
What you can do after
Apply it via Git tags or artifact labels to select explicit module versions and manage breaking infrastructure changes.
How it connects
Connects infrastructure as code, modules, dependency management, version control, artifact repositories, and secrets managers.

Also explained in

Compare how 8 books explain semantic versioning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.