Deployment walkthrough
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 IaC 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
from v0.5.x
to v0.9.x
, read the notes for v0.6.0
, v0.7.0
, v0.8.0
, and v0.9.0
to get the migration steps for
all backward incompatible updates in your upgrade path.
Version Compatibility table
Gruntwork Repo | Minimum version with AWS Provider v4 support |
terraform-aws-utilities | |
terraform-aws-vpc | |
terraform-aws-asg | |
terraform-aws-server | |
terraform-aws-lambda | |
terraform-aws-security | |
terraform-aws-load-balancer | |
terraform-aws-data-storage | |
terraform-aws-cache | |
terraform-aws-messaging | |
terraform-aws-static-assets | |
terraform-aws-monitoring | |
terraform-aws-openvpn | |
terraform-aws-ecs | |
terraform-aws-ci | |
terraform-aws-eks | |
terraform-aws-service-catalog | |
terraform-aws-cis-service-catalog |
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
ripgrep
,xargs
, andsed
to accomplish this. - E.g.:
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 ofv0.95.0
withv0.96.1
in 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
- Run
terraform init -upgrade
to allow Terraform to pull in the latest provider version. Without the-upgrade
flag the3.75.X
version of the provider will be used instead. The-upgrade
flag allows unlocking the provider restriction enforced interraform.lock.hcl
, in the module folder. - Follow up with
terraform plan
. NOTE: The provider update creates and updates resources. You will see changes in theplan
. These should be safe toapply
, but always double-check anything slated for destruction. - Then run
terraform apply
to 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.