Skip to content

Commit 1e750c8

Browse files
authored
feat!: Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively (#173)
1 parent 7708154 commit 1e750c8

File tree

30 files changed

+108
-79
lines changed

30 files changed

+108
-79
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.96.1
3+
rev: v1.99.4
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,14 @@ module "eventbridge" {
381381

382382
| Name | Version |
383383
|------|---------|
384-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
385-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
384+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
385+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
386386

387387
## Providers
388388

389389
| Name | Version |
390390
|------|---------|
391-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.98 |
391+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
392392

393393
## Modules
394394

@@ -523,6 +523,7 @@ No modules.
523523
| <a name="input_policy_jsons"></a> [policy\_jsons](#input\_policy\_jsons) | List of additional policy documents as JSON to attach to IAM role | `list(string)` | `[]` | no |
524524
| <a name="input_policy_path"></a> [policy\_path](#input\_policy\_path) | Path of IAM policy to use for EventBridge | `string` | `null` | no |
525525
| <a name="input_policy_statements"></a> [policy\_statements](#input\_policy\_statements) | Map of dynamic policy statements to attach to IAM role | `any` | `{}` | no |
526+
| <a name="input_region"></a> [region](#input\_region) | Region where the resource(s) will be managed. Defaults to the region set in the provider configuration | `string` | `null` | no |
526527
| <a name="input_role_description"></a> [role\_description](#input\_role\_description) | Description of IAM role to use for EventBridge | `string` | `null` | no |
527528
| <a name="input_role_force_detach_policies"></a> [role\_force\_detach\_policies](#input\_role\_force\_detach\_policies) | Specifies to force detaching any policies the IAM role has before destroying it. | `bool` | `true` | no |
528529
| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | Name of IAM role to use for EventBridge | `string` | `null` | no |

examples/api-gateway-event-source/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.98 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
3131
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |
3232

3333
## Modules

examples/api-gateway-event-source/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.5.7"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.98"
7+
version = ">= 6.0"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/complete/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,30 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
2424
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
2525
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.98 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
3232
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
3333
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |
3434

3535
## Modules
3636

3737
| Name | Source | Version |
3838
|------|--------|---------|
39-
| <a name="module_bucket"></a> [bucket](#module\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 3.0 |
39+
| <a name="module_bucket"></a> [bucket](#module\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 5.0 |
4040
| <a name="module_disabled"></a> [disabled](#module\_disabled) | ../../ | n/a |
4141
| <a name="module_ecs"></a> [ecs](#module\_ecs) | terraform-aws-modules/ecs/aws | ~> 3.0 |
4242
| <a name="module_eventbridge"></a> [eventbridge](#module\_eventbridge) | ../../ | n/a |
43-
| <a name="module_lambda"></a> [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | ~> 6.0 |
43+
| <a name="module_lambda"></a> [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | ~> 8.0 |
4444
| <a name="module_sns"></a> [sns](#module\_sns) | terraform-aws-modules/sns/aws | ~> 6.0 |
45-
| <a name="module_step_function"></a> [step\_function](#module\_step\_function) | terraform-aws-modules/step-functions/aws | ~> 2.0 |
45+
| <a name="module_step_function"></a> [step\_function](#module\_step\_function) | terraform-aws-modules/step-functions/aws | ~> 5.0 |
4646

4747
## Resources
4848

examples/complete/main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ resource "aws_cloudwatch_log_group" "this" {
293293

294294
module "step_function" {
295295
source = "terraform-aws-modules/step-functions/aws"
296-
version = "~> 2.0"
296+
version = "~> 5.0"
297297

298298
name = random_pet.this.id
299299

@@ -353,11 +353,11 @@ EOF
353353

354354
module "lambda" {
355355
source = "terraform-aws-modules/lambda/aws"
356-
version = "~> 6.0"
356+
version = "~> 8.0"
357357

358358
function_name = "${random_pet.this.id}-lambda"
359359
handler = "index.lambda_handler"
360-
runtime = "python3.8"
360+
runtime = "python3.12"
361361

362362
create_package = false
363363
local_existing_package = local.downloaded
@@ -438,7 +438,7 @@ data "aws_caller_identity" "current" {}
438438

439439
module "bucket" {
440440
source = "terraform-aws-modules/s3-bucket/aws"
441-
version = "~> 3.0"
441+
version = "~> 5.0"
442442

443443
bucket = "${random_pet.this.id}-bucket"
444444
attach_policy = true
@@ -461,7 +461,7 @@ data "aws_iam_policy_document" "bucket_policy" {
461461
]
462462
condition {
463463
test = "StringEquals"
464-
values = ["arn:aws:cloudtrail:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:trail/${random_pet.this.id}-trail"]
464+
values = ["arn:aws:cloudtrail:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:trail/${random_pet.this.id}-trail"]
465465
variable = "aws:SourceArn"
466466
}
467467
}
@@ -483,7 +483,7 @@ data "aws_iam_policy_document" "bucket_policy" {
483483
}
484484
condition {
485485
test = "StringEquals"
486-
values = ["arn:aws:cloudtrail:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:trail/${random_pet.this.id}-trail"]
486+
values = ["arn:aws:cloudtrail:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:trail/${random_pet.this.id}-trail"]
487487
variable = "aws:SourceArn"
488488
}
489489
}
@@ -495,7 +495,7 @@ data "aws_iam_policy_document" "bucket_policy" {
495495
#######
496496
#module "lambda" {
497497
# source = "terraform-aws-modules/lambda/aws"
498-
# version = "~> 2.0"
498+
# version = "~> 8.0"
499499
#
500500
# function_name = "dev-cron-job"
501501
# description = "Lambda Serverless Job"

examples/complete/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.5.7"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.98"
7+
version = ">= 6.0"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/default-bus/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.98 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
3131
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |
3232

3333
## Modules

examples/default-bus/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.5.7"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.98"
7+
version = ">= 6.0"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/with-api-destination/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.98 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.98 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
3131
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |
3232

3333
## Modules

0 commit comments

Comments
 (0)