From 9d8b8f4678ba1d83462becd6be9aee3d3b9700f2 Mon Sep 17 00:00:00 2001 From: Adrian Clay Date: Tue, 26 Nov 2024 22:17:39 +0000 Subject: [PATCH] Move provider version constraints into terraform blocks See also: https://developer.hashicorp.com/terraform/language/providers/requirements --- aws/components/OneOneOne/terraform.tf | 7 ++++++- aws/components/account/terraform.tf | 7 ++++++- aws/components/base/terraform.tf | 7 ++++++- aws/components/fake_mesh/terraform.tf | 7 ++++++- aws/components/lab-results/terraform.tf | 7 ++++++- aws/components/mhs/terraform.tf | 7 ++++++- aws/components/nhais/terraform.tf | 7 ++++++- aws/components/nhais_responder/terraform.tf | 7 ++++++- aws/components/pss/terraform.tf | 7 ++++++- 9 files changed, 54 insertions(+), 9 deletions(-) diff --git a/aws/components/OneOneOne/terraform.tf b/aws/components/OneOneOne/terraform.tf index ad1a606..f871c21 100755 --- a/aws/components/OneOneOne/terraform.tf +++ b/aws/components/OneOneOne/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.28" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.28" region = var.region } \ No newline at end of file diff --git a/aws/components/account/terraform.tf b/aws/components/account/terraform.tf index 575108a..17f5189 100755 --- a/aws/components/account/terraform.tf +++ b/aws/components/account/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 2.62" + } + } } # Setup AWS provider provider "aws" { - version = "~> 2.62" region = var.region } diff --git a/aws/components/base/terraform.tf b/aws/components/base/terraform.tf index 239f5aa..8858323 100755 --- a/aws/components/base/terraform.tf +++ b/aws/components/base/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 2.62" + } + } } # Setup AWS provider provider "aws" { - version = "~> 2.62" region = var.region } \ No newline at end of file diff --git a/aws/components/fake_mesh/terraform.tf b/aws/components/fake_mesh/terraform.tf index 40c7aa8..57dfde1 100755 --- a/aws/components/fake_mesh/terraform.tf +++ b/aws/components/fake_mesh/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.28" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.28" region = var.region } diff --git a/aws/components/lab-results/terraform.tf b/aws/components/lab-results/terraform.tf index 9aca3d5..15a2b24 100644 --- a/aws/components/lab-results/terraform.tf +++ b/aws/components/lab-results/terraform.tf @@ -3,11 +3,16 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.28" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.28" region = var.region } diff --git a/aws/components/mhs/terraform.tf b/aws/components/mhs/terraform.tf index 40c7aa8..57dfde1 100755 --- a/aws/components/mhs/terraform.tf +++ b/aws/components/mhs/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.28" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.28" region = var.region } diff --git a/aws/components/nhais/terraform.tf b/aws/components/nhais/terraform.tf index ad1a606..f871c21 100755 --- a/aws/components/nhais/terraform.tf +++ b/aws/components/nhais/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.28" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.28" region = var.region } \ No newline at end of file diff --git a/aws/components/nhais_responder/terraform.tf b/aws/components/nhais_responder/terraform.tf index ad1a606..f871c21 100755 --- a/aws/components/nhais_responder/terraform.tf +++ b/aws/components/nhais_responder/terraform.tf @@ -3,10 +3,15 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.28" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.28" region = var.region } \ No newline at end of file diff --git a/aws/components/pss/terraform.tf b/aws/components/pss/terraform.tf index f8c46ae..887978b 100644 --- a/aws/components/pss/terraform.tf +++ b/aws/components/pss/terraform.tf @@ -3,11 +3,16 @@ terraform { backend "s3" { # Intentionally blank - all parameters provided in command line } + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.37" + } + } } # Setup AWS provider provider "aws" { - version = "~> 3.37" region = var.region }