From 0cf2b5d751600c716aaf2c222ea24721611f16a2 Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Fri, 11 Feb 2022 22:48:58 +0100 Subject: [PATCH] fix: Limit AWS Terraform Provider to 3.* (#1741) AWS Terraform provider 4.0 contains breaking changes. Therefor we limit for now the provider version to 3.* --- README.md | 4 ++-- modules/download-lambda/README.md | 5 ++++- modules/download-lambda/versions.tf | 10 ++++++++++ modules/runner-binaries-syncer/README.md | 4 ++-- modules/runner-binaries-syncer/versions.tf | 2 +- modules/runners/README.md | 4 ++-- modules/runners/versions.tf | 2 +- modules/setup-iam-permissions/README.md | 7 +++++-- modules/setup-iam-permissions/versions.tf | 10 ++++++++++ modules/ssm/versions.tf | 2 +- modules/webhook/README.md | 6 +++--- modules/webhook/versions.tf | 2 +- versions.tf | 2 +- 13 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 modules/download-lambda/versions.tf create mode 100644 modules/setup-iam-permissions/versions.tf diff --git a/README.md b/README.md index fac0d22548..0bd51f6135 100644 --- a/README.md +++ b/README.md @@ -362,13 +362,13 @@ In case the setup does not work as intended follow the trace of events: | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.1 | -| [aws](#requirement\_aws) | >= 3.38 | +| [aws](#requirement\_aws) | ~> 3.38 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.38 | +| [aws](#provider\_aws) | ~> 3.38 | | [random](#provider\_random) | n/a | ## Modules diff --git a/modules/download-lambda/README.md b/modules/download-lambda/README.md index d4ab5f9816..246bb82ffc 100644 --- a/modules/download-lambda/README.md +++ b/modules/download-lambda/README.md @@ -27,7 +27,10 @@ module "lambdas" { ## Requirements -No requirements. +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 0.14.1 | +| [aws](#requirement\_aws) | ~> 3.38 | ## Providers diff --git a/modules/download-lambda/versions.tf b/modules/download-lambda/versions.tf new file mode 100644 index 0000000000..fa47076ba3 --- /dev/null +++ b/modules/download-lambda/versions.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">= 0.14.1" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.38" + } + } +} diff --git a/modules/runner-binaries-syncer/README.md b/modules/runner-binaries-syncer/README.md index 5bd2cf408a..de7e67aa49 100644 --- a/modules/runner-binaries-syncer/README.md +++ b/modules/runner-binaries-syncer/README.md @@ -39,13 +39,13 @@ yarn run dist | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.1 | -| [aws](#requirement\_aws) | >= 3.38 | +| [aws](#requirement\_aws) | ~> 3.38 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.38 | +| [aws](#provider\_aws) | ~> 3.38 | ## Modules diff --git a/modules/runner-binaries-syncer/versions.tf b/modules/runner-binaries-syncer/versions.tf index 8aa9d04bdc..fa47076ba3 100644 --- a/modules/runner-binaries-syncer/versions.tf +++ b/modules/runner-binaries-syncer/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.38" + version = "~> 3.38" } } } diff --git a/modules/runners/README.md b/modules/runners/README.md index 83bb8d2b91..1cbbed6254 100644 --- a/modules/runners/README.md +++ b/modules/runners/README.md @@ -53,13 +53,13 @@ yarn run dist | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.1 | -| [aws](#requirement\_aws) | >= 3.38 | +| [aws](#requirement\_aws) | ~> 3.38 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.38 | +| [aws](#provider\_aws) | ~> 3.38 | ## Modules diff --git a/modules/runners/versions.tf b/modules/runners/versions.tf index 8aa9d04bdc..fa47076ba3 100644 --- a/modules/runners/versions.tf +++ b/modules/runners/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.38" + version = "~> 3.38" } } } diff --git a/modules/setup-iam-permissions/README.md b/modules/setup-iam-permissions/README.md index bb7a098067..c0e78f7638 100644 --- a/modules/setup-iam-permissions/README.md +++ b/modules/setup-iam-permissions/README.md @@ -39,13 +39,16 @@ Next execute the created Terraform code `terraform init && terraform apply` The ## Requirements -No requirements. +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 0.14.1 | +| [aws](#requirement\_aws) | ~> 3.38 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | n/a | +| [aws](#provider\_aws) | ~> 3.38 | ## Modules diff --git a/modules/setup-iam-permissions/versions.tf b/modules/setup-iam-permissions/versions.tf new file mode 100644 index 0000000000..fa47076ba3 --- /dev/null +++ b/modules/setup-iam-permissions/versions.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">= 0.14.1" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.38" + } + } +} diff --git a/modules/ssm/versions.tf b/modules/ssm/versions.tf index 8aa9d04bdc..fa47076ba3 100644 --- a/modules/ssm/versions.tf +++ b/modules/ssm/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.38" + version = "~> 3.38" } } } diff --git a/modules/webhook/README.md b/modules/webhook/README.md index 61f359e322..52fc6c5248 100644 --- a/modules/webhook/README.md +++ b/modules/webhook/README.md @@ -39,13 +39,13 @@ yarn run dist | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.1 | -| [aws](#requirement\_aws) | >= 3.38 | +| [aws](#requirement\_aws) | ~> 3.38 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.38 | +| [aws](#provider\_aws) | ~> 3.38 | ## Modules @@ -87,7 +87,7 @@ No modules. | [repository\_white\_list](#input\_repository\_white\_list) | List of repositories allowed to use the github app | `list(string)` | `[]` | no | | [role\_path](#input\_role\_path) | The path that will be added to the role; if not set, the environment name will be used. | `string` | `null` | no | | [role\_permissions\_boundary](#input\_role\_permissions\_boundary) | Permissions boundary that will be added to the created role for the lambda. | `string` | `null` | no | -| [runner\_labels](#input\_runner\_labels) | Labels for the runners (GitHub). Separate each label by a comma. Labels are used to check events when `runner_enable_workflow_job_labels_check` is set to `true`. | `string` | `""` | no | +| [runner\_labels](#input\_runner\_labels) | Extra (custom) labels for the runners (GitHub). Separate each label by a comma. Labels checks on the webhook can be enforced by setting `enable_workflow_job_labels_check`. GitHub read-only labels should not be provided. | `string` | `""` | no | | [sqs\_build\_queue](#input\_sqs\_build\_queue) | SQS queue to publish accepted build events. |
object({
id = string
arn = string
})
| n/a | yes | | [sqs\_build\_queue\_fifo](#input\_sqs\_build\_queue\_fifo) | Enable a FIFO queue to remain the order of events received by the webhook. Suggest to set to true for repo level runners. | `bool` | `false` | no | | [tags](#input\_tags) | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | `map(string)` | `{}` | no | diff --git a/modules/webhook/versions.tf b/modules/webhook/versions.tf index 8aa9d04bdc..fa47076ba3 100644 --- a/modules/webhook/versions.tf +++ b/modules/webhook/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.38" + version = "~> 3.38" } } } diff --git a/versions.tf b/versions.tf index 8aa9d04bdc..fa47076ba3 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.38" + version = "~> 3.38" } } }