Skip to content

Upgrade Terraform v0.12 to v0.13

Since Terraform supports upgrading from one major release at a time, all terraform modules should be updated from v0.12.X to v0.13.X following the Terraform v0.13 Upgrade Guide.

New releases for the upgraded modules should be updated in gitlab-com-infrastructure

Steps to upgrade module from Terraform v0.12 to v0.13.X:

  • Pull latest changes for the module
  • Create new branch for executing the upgrade.
  • Set local terraform version to 0.13.7
  • Run terraform 0.13upgrade
  • If necessary, make manual changes as instructed by the upgrade command.
  • Run git diff to see all changes.
  • Bump the Terraform version for Pipelines in .terraform-version
  • Create a commit message that starts with BREAKING CHANGE: to bump the module version.

Modules should be made backward compatible with Terraform v0.12 by setting the version to >= 0.12.26. This will allow us to bump the version on gitlab-com-infrastructure before we update that repo and state to use Terraform v0.13.

Edited by Marcel Chacon