Updating references to Gruntwork Infrastructure as Code Library
In order to take advantage of the Terraform AWS provider version 4, you need to update your references to the Gruntwork Infrastructure as Code Library to use a compatible version. We (Gruntwork) have gone through all our modules in the library to test and update the code to be compatible with AWS provider version 4. As a customer, you need to update to the proper versions of the Gruntwork library to pick up the fixes/changes that were made to be compatible. Be sure to read the release notes to know what changes need to be made to update to that version.
Refer to our guide on "Updating to new versions" for instructions on how to update the versions in your code.
The following table lists the versions of relevant Gruntwork AWS IaC library modules and Service Catalogs which are compatible with AWS provider version 4. Since the AWS provider version 3 upgrade, we have sunsetted some of our module repos. They have not been updated and are not listed below. Please visit the repo READMEs to see our recommendations for alternatives to those modules.
Gruntwork follows semantic versioning.
For pre-1.0 modules, version updates to the minor version are considered backward incompatible releases. Make sure to
read the release notes for the relevant modules anytime you are updating minor versions! For example, if you are going
v0.9.x, read the notes for
v0.9.0 to get the migration steps for
all backward incompatible updates in your upgrade path.
Version Compatibility table
Minimum version with AWS Provider v4 support
Update the Gruntwork Reference Architecture to AWS Provider v4
If you purchased the Gruntwork Reference Architecture, update the relevant code in
infrastructure-live to use a
compatible version of the Gruntwork Infrastructure as Code Library, as per
the compatibility table above.
To update your Reference Architecture:
- Update the underlying module source versions being referenced.
- We recommend using tools like
sedto accomplish this.
rg v0.95.0 --files-with-matches | xargs sed -i '' "s|v0.95.0|v0.96.1|g". This command finds and replaces all instances of
v0.96.1in your repo. Double-check all your changes before committing them to version control.
- If you are several minors behind, please follow the migration guide for each minor version bump. Use the find-and-replace command to bump one minor version at a time.
- Update the underlying Service Catalog versions, and also any one-off library module versions as well. You can accomplish this by grepping for each of the repos in the table above.
- We recommend using tools like
terraform init -upgradeto allow Terraform to pull in the latest provider version. Without the
3.75.Xversion of the provider will be used instead. The
-upgradeflag allows unlocking the provider restriction enforced in
terraform.lock.hcl, in the module folder.
- Follow up with
terraform plan. NOTE: The provider update creates and updates resources. You will see changes in the
plan. These should be safe to
apply, but always double-check anything slated for destruction.
- Then run
terraform applyto bring Terraform state in sync with the provider changes.
If you have any questions, we'd love to hear them. Please reach out to Gruntwork Support.