Intro

This guide will walk you through how to update the Gruntwork Reference Architecture and any code that depends on the Gruntwork Infrastructure as Code Library to version 3.x of the Terraform AWS provider. Following the release of v3.0.0, new features and bug fixes will only be available on version 3.x, but it also has a number of backwards incompatibilities that have to be incorporated into your codebase.

What you’ll learn in this guide

This guide consists of three main sections:

Core Concepts

An overview of version 3 of the AWS provider and why it is important to update your code for compatibility.

Deployment walkthrough

The steps you need to take to update your code relying on the Gruntwork Infrastructure as Code library and your version of the Gruntwork Reference Architecture with compatibility with AWS provider v3. Includes a version compatibility table you can use as a reference to know which Gruntwork Repo version tag is compatible with AWS provider v3.

Core Concepts

Background

Version v3.0.0 of the Terraform AWS provider was released on July 30th 2020 with backwards incompatible updates. Following the provider release cycle, future releases from this point onward would only be compatible with 3.X. This means that if you wish to use any new resources or data sources that are released from this point onwards, you will need to be compatible with version 3 of the AWS provider to be able to pull those changes in.

Since this is a major version change, there are a number of backwards incompatible changes that were introduced. In order to be able to use version 3, you need to update your code to be compatible when upgrading (specifically, the resource and data source blocks that have backwards incompatible changes).

For your own code, you can follow the official guide on updating to AWS provider version 3. The rest of this guide will focus on updating references to Gruntwork modules and the Gruntwork Reference Architecture to be compatible with AWS provider version 3.

Deployment walkthrough

Updating references to Gruntwork Infrastructure as Code Library

In order to take advantage of the Terraform AWS provider version 3, 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 3. 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 the "Updating" section of "How to use the Gruntwork Infrastructure as Code Library" for instructions on how to update the versions in your code.

The following table provides a summary of all the relevant Gruntwork AWS modules and the respective versions that are compatible with AWS provider version 3.

Important
Gruntwork follows semantic versioning. For any pre-1.0 modules, this means that version updates to the minor version are considered backwards incompatible releases for any version updates prior to 1.0.0 release. Make sure to read the release notes for the relevant modules any time you are updating minor versions! Note that you will want to read the release notes for each minor version that is updated (e.g., if you are going from v0.5.x to v0.9.x, you will want to read the notes for v0.6.0, v0.7.0, v0.8.0, and v0.9.0 to get the full list of backwards incompatible updates).
Gruntwork Repo Minimum version with AWS Provider v3 support

terraform-aws-vpc

v0.9.0

module-asg

v0.10.0

module-data-storage

v0.15.0

module-server

v0.8.5

package-lambda

v0.8.1

package-sam

v0.2.1

module-cache

v0.9.4

package-messaging

v0.3.4

package-static-assets

v0.6.5

terraform-aws-monitoring

v0.22.1

package-openvpn

v0.11.0

module-security

v0.35.0

module-ecs

v0.22.0

module-ci

v0.27.3

terraform-aws-eks

v0.22.1

module-load-balancer

v0.20.4

terraform-aws-couchbase

v0.3.0

package-zookeeper

v0.6.7

package-kafka

v0.6.3

package-elk

v0.6.0

terraform-aws-influx

v0.1.3

terraform-aws-vault

v0.13.11

terraform-aws-consul

v0.7.10

terraform-aws-nomad

v0.6.6

package-terraform-utilities

v0.2.1

cis-compliance-aws

v0.6.0

Updating the Gruntwork Reference Architecture to AWS Provider v3

If you purchased the Gruntwork Reference Architecture, you will have a copy of the infrastructure-live and infrastructure-modules repositories that contain the infrastructure code for deploying the Reference Architecture. You will need to update the relevant code in infrastructure-modules to use a compatible version of the Gruntwork Infrastructure as Code Library, as per the compatibility table above.

To help guide you through the upgrade process, we have updated the Acme Reference Architecture examples to support AWS provider v3. You can refer to the following release notes for detailed information and code patches that you can apply to update your snapshot of the Gruntwork Reference Architecture:

CIS Reference Architecture

Refer to the release notes for v0.0.1-20201021 of the cis-infrastructure-live-acme repository for instructions on how to update the CIS components of the Reference Architecture to be compatible with AWS provider v3. For all other components, refer to the release notes for v0.0.1-20201021 of the infrastructure-modules-multi-account-acme repository.

Standard Reference Architecture

Refer to the release notes for v0.0.1-20201021 of the infrastructure-modules-multi-account-acme repository for instructions on how to update your components to be compatible with AWS provider v3.