docs/design-decisions/changie-migration.md
go-changelog to ChangieSummary: Migrate CHANGELOG generation from go-changelog to Changie for improved automation, better user experience, and alignment with modern development workflows.
Created: 2025-10-23
Author: @justinretzolk
The Terraform AWS Provider has historically used go-changelog for managing CHANGELOG entries. Contributors would create text-based fragment files in the .changelog/ directory with a specific format, and these would be manually compiled into the main CHANGELOG.md file during releases.
While functional, this approach had several limitations:
Migrate to Changie for CHANGELOG management. Changie provides a modern, YAML-based approach to CHANGELOG fragments with robust automation capabilities.
.changes/
├── footer.md # Footer appended to CHANGELOG.md after each merge
└── 6.x/
├── unreleased/ # New entries created by Changie
│ └── .gitkeep # Ensures the directory is tracked by git when empty
├── beta/ # Change fragments from beta releases on release branches
├── ga/ # Change fragments from GA releases on release branches
├── 6.0.0.md # Per-version CHANGELOG
├── 6.1.0.md
└── ...
Note: Changie does not natively support appending a footer only to the CHANGELOG generated by
changie merge— it can only add footers to every per-version CHANGELOG. Because of this,footer.mdis appended toCHANGELOG.mdas a separate, explicit step in the automation workflows after eachchangie mergecall.
Changie entries are YAML files with structured metadata, generated using Changie's CLI tool.
Note: During generation, Changie creates files with a specific file naming pattern that's used during CHANGELOG generation. As such, manually creating change fragments should be avoided.
kind: enhancement
time: 2024-10-23T10:30:00Z
custom:
Impact: |-
resource/aws_example
Body: Add `example_attribute` argument
PullRequest: 12345
Five entry types are configured:
GitHub Actions workflows validate:
no-changelog-needed)go-changelog style change fragments are included in pull requestsPullRequest Key: Ensures pull request number is included. Where missing, inline suggestions are madeThe provider uses main for next minor release development and release/N.x branches for major release cycles (beta/GA) and backports. Automated workflows determine the next version based on this context:
On main branch:
6.1.0 → 6.2.0)release/N.x branches: Reuses version number from version/VERSIONOn release/N.x branches:
6.0.0-beta1 → 6.0.0-beta2)version/VERSION (e.g., 6.0.0-beta1)6.0.0 GA → 6.1.0-beta1)When a new major version begins, three preparatory steps are taken before development starts:
7.x/) is created in .changes/changesDir in .changie.yaml is updated to point to the new directoryCHANGELOG.mdMajor releases follow a structured beta-to-GA process:
Beta Phase (on release/N.x branch):
beta/ subdirectory after each beta release6.0.0-beta1.md)GA Release (on release/N.x branch):
ga/ subdirectory6.0.0.md)Merge to main from release/N.x Branch:
unreleased/This approach ensures release branches maintain separate beta and GA release notes, while the main branch has a single, comprehensive CHANGELOG for the major version.
Changie's replacements feature updates lines in specified files that match a given regex pattern whenever changie merge is run. This is used to keep version/VERSION in sync with the current release version automatically — without requiring a separate workflow step or manual update:
replacements:
- path: version/VERSION
find: '[0-9]\.(?:[0-9])+\.(?:[0-9])+'
replace: "{{ .VersionNoPrefix }}"
This means every changie merge call automatically updates version/VERSION to reflect the new version.
Three GitHub Actions workflows automate CHANGELOG management:
changelog-entries.yml - Validates entries on PRs, detects legacy fragments, provides conversion instructions, and notifies maintainers via Slack when entries are missed in merged pull requestsupdate-changelog.yml - Automatically regenerates CHANGELOG when PRs merge, and supports manual triggering for release preparationcreate-release-branch.yml - Automates major release branch creationmake changelog-convert - Converts go-changelog fragments to Changie formatmake changelog-misspell - Updated to check both legacy and new directoriesgenerate-changelog - Deprecated with helpful error messageThe migration is being implemented incrementally to minimize disruption:
Phase 1: Core Infrastructure
.changes/ directory structure with version subdirectoriesmake tools installationPhase 2: Automation
Phase 3: Developer Experience
docs/changelog-process.md)changelog-misspell, generate-changelog)Phase 4: Final Migration + Tooling
.changelog/ fragmentsDuring the transition, both systems are supported:
.changelog/ directory: Remains in place.changes/ directory: All new entries go hereThis dual-support approach allows:
If critical issues are discovered after deployment, the migration can be rolled back:
.changelog/ directory - Available in git history from the reverted commit.changes/ directory - Clean up Changie artifacts