Versioning
Understand how Patterned Designs modules are versioned and how to manage upgrades.
This page explains the versioning strategy for Patterned Designs modules.
Semantic Versioning
All modules follow Semantic Versioning (SemVer):
- MAJOR (1.x.x) - Breaking changes
- MINOR (x.1.x) - New features, backward compatible
- PATCH (x.x.1) - Bug fixes, backward compatible
Version Constraints
Specify version constraints in your Terraform configuration:
module "vpc" {
source = "registry.patterneddesigns.ca/patterneddesigns/vpc/aws"
version = "~> 1.0" # Any 1.x version
}
Constraint Syntax
| Constraint | Meaning |
|---|---|
= 1.0.0 | Exactly version 1.0.0 |
>= 1.0.0 | Version 1.0.0 or higher |
~> 1.0 | Any 1.x version |
~> 1.0.0 | Any 1.0.x version |
Upgrading Modules
Check for Updates
Review the changelog for each module to understand changes between versions.
Update Safely
- Update the version constraint
- Run
terraform init -upgrade - Run
terraform planto preview changes - Apply if changes are acceptable
Breaking Changes
Major version upgrades may include breaking changes. Always:
- Read the changelog
- Test in a non-production environment
- Plan before applying
Pinning Versions
For production, pin to specific versions:
version = "1.2.3" # Exact version
This ensures reproducible builds and prevents unexpected changes.
Next Steps
- Module Structure - Learn module organization
- Best Practices - Follow recommended patterns