Skip to content

Commit

Permalink
Pin Terraform version - [CORE-1297] (gruntwork-io#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
arsci authored Oct 3, 2023
1 parent 7e32081 commit 7aa4174
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 40 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[![Maintained by Gruntwork.io](https://img.shields.io/badge/maintained%20by-gruntwork.io-%235849a6.svg)](https://gruntwork.io/?ref=repo_package_terraform_utilities)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/gruntwork-io/terraform-aws-utilities.svg?label=latest)](https://github.com/gruntwork-io/terraform-aws-utilities/releases/latest)
![Terraform Version](https://img.shields.io/badge/tf-%3E%3D1.1.0-blue.svg)
![Terraform Version](https://img.shields.io/badge/tf-%3E%3D1.1.0%3C%2C%20%3C%3D1.5.7-blue.svg)

# Terraform Utility Modules

This repo contains miscellaneous utility and helper modules for use with Terraform.

## Information on HashiCorp BSL License Change

Due to the HashiCorp BSL license change, we are restricting Terraform to the latest open source version (`1.5.7`).
Going forward we will be adding support for OpenTofu. To learn more, see the official [OpenTofu website](https://opentofu.org/)
and [project status](https://github.com/opentofu/opentofu/blob/main/WEEKLY_UPDATES.md).

## What is in this repo

This repo provides a Gruntwork IaC Package and has the following folder structure:
Expand Down
6 changes: 4 additions & 2 deletions examples/executable-dependency/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "executable" {
Expand Down
8 changes: 5 additions & 3 deletions examples/instance-type/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

provider "aws" {
Expand Down Expand Up @@ -55,6 +57,6 @@ data "aws_ami" "ubuntu" {

filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"]
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
}
}
6 changes: 4 additions & 2 deletions examples/join-path/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "path" {
Expand Down
6 changes: 4 additions & 2 deletions examples/list-remove/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "list_remove" {
Expand Down
6 changes: 4 additions & 2 deletions examples/operating-system/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "os" {
Expand Down
6 changes: 4 additions & 2 deletions examples/pex/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

# Run the PEX binary as a local-exec provisioner on a null_resource.
Expand Down
6 changes: 4 additions & 2 deletions examples/request-quota-increase/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

provider "aws" {
Expand Down
6 changes: 4 additions & 2 deletions examples/require-executable/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "require_executables" {
Expand Down
6 changes: 4 additions & 2 deletions modules/executable-dependency/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

data "external" "executable" {
Expand Down
7 changes: 5 additions & 2 deletions modules/instance-type/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"

required_providers {
aws = {
source = "hashicorp/aws"
Expand Down
6 changes: 4 additions & 2 deletions modules/join-path/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "os" {
Expand Down
6 changes: 4 additions & 2 deletions modules/list-remove/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

# Remove the items in items_to_remove from original_list. This works because:
Expand Down
6 changes: 4 additions & 2 deletions modules/operating-system/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

data "external" "os" {
Expand Down
6 changes: 4 additions & 2 deletions modules/prepare-pex-environment/dependencies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

# Figure out the OS environment
Expand Down
6 changes: 4 additions & 2 deletions modules/prepare-pex-environment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

data "external" "determine_python_path" {
Expand Down
7 changes: 5 additions & 2 deletions modules/request-quota-increase/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"

required_providers {
aws = {
source = "hashicorp/aws"
Expand Down
6 changes: 4 additions & 2 deletions modules/require-executable/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"

# Updating the Terraform external provider to 2.3.0 caused an undocumented breaking change (as evidenced by
# issues like https://github.com/hashicorp/terraform-provider-external/issues/193). The solution is to pin
Expand Down
6 changes: 4 additions & 2 deletions modules/run-pex-as-data-source/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "pex_env" {
Expand Down
6 changes: 4 additions & 2 deletions modules/run-pex-as-resource/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

terraform {
# This module is now only being tested with Terraform 1.1.x. However, to make upgrading easier, we are setting 1.0.0 as the minimum version.
required_version = ">= 1.0.0"
# Due to the HashiCorp BSL License change, we are restricting the latest version of Terraform to 1.5.7.
# Going forward we will be adding support for OpenTofu. For additional information on OpenTofu please
# see the official OpenTofu website at https://opentofu.org/.
required_version = ">= 1.0.0, <= 1.5.7"
}

module "pex_env" {
Expand Down

0 comments on commit 7aa4174

Please sign in to comment.