The latest minor version of
terraform, the 0.12.x series, dropped recently and in true bleeding edge Arch Linux fashion, I’m already running it.
Thing is though, the latest release of
terraform, even though it’s a minor point release, does include breaking changes from the 0.11.x series.
If you’re running Arch and don’t want to run the latest version of a specific package, you will need to downgrade to the version you’d like to.
For me, that was version 0.11.14 of
terraform which incidentally, I had never installed since I didn’t run any upgrades between 0.11.13 being released and 0.12.0 coming out.
Sourcing from the locally stored cache
For the sake of conversation, if you did have the specific version you want to downgrade to previously installed, you can reference it from your local cache as such:
Sourcing from the Arch Linux Archive
Since I wanted to downgrade to 0.11.14, I needed to find the version out on the Arch Linux Archive (ALA). The packages are indexed by first letter, so it didn’t take much to find the
terraform package I needed
Having downloaded both the archive as well as the signature, I was able to verify that everything was on the up and up:
Installing the downgraded package
And then downgrade the package to the specific version I had downloaded:
Once the downgrade finished, I verified that I was in fact running version 0.11.14:
Success! But we’re not done yet.
Pinning the downgraded package version
Because Arch is a rolling release, it sees the
terraform package as out of date compared to the version upstream. Because of it, the next time I run an upgrade, I’ll overwrite my downgraded package with the latest one.
To circumvent this behavior, we need to list the package in our
/etc/pacman.conf file as part of our “ignored packages:
Once open, search for
IgnorePkg, which is probably commented out if you’ve
never added any packages before. Uncomment it if it is, and simply add
terraform to your list of packages to ignore when upgrading:
And now the package won’t be upgraded. Don’t believe me? You can try to reinstall
terraform, which will alert you to the fact that the package is being ignored, and requesting confirmation to proceed:
Keep in mind, this really isn’t intended as a permanent solution. Given enough time, dependencies will end up growing stale and pinning an old version like this can lead to bigger problems if left alone.
Next steps for me will be to look further into the breaking changes between 0.11.x and 0.12.x and come up with a migration plan to get us to the latest version.
Once that happens, I can remove
/etc/pacman.conf and upgrade
terraform back to it’s bleeding edge glory!