From 7562b0d03b7c1bf9aab9a5fe9b2c81c6e9115e40 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Thu, 26 Jun 2025 18:14:02 +0200 Subject: [PATCH 1/2] feat!: Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively (#70) --- .pre-commit-config.yaml | 2 +- README.md | 7 ++++--- examples/complete/README.md | 8 ++++---- examples/complete/main.tf | 4 ++-- examples/complete/versions.tf | 4 ++-- main.tf | 4 ++++ variables.tf | 5 +++++ versions.tf | 4 ++-- 8 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6cd369..776bc24 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.96.1 + rev: v1.99.4 hooks: - id: terraform_fmt - id: terraform_docs diff --git a/README.md b/README.md index 2fb0688..568355b 100644 --- a/README.md +++ b/README.md @@ -133,14 +133,14 @@ module "step_function" { | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.61 | +| [terraform](#requirement\_terraform) | >= 1.5.7 | +| [aws](#requirement\_aws) | >= 6.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.61 | +| [aws](#provider\_aws) | >= 6.0 | ## Modules @@ -204,6 +204,7 @@ No modules. | [policy\_path](#input\_policy\_path) | Path of IAM policies to use for Step Function | `string` | `null` | no | | [policy\_statements](#input\_policy\_statements) | Map of dynamic policy statements to attach to IAM role | `any` | `{}` | no | | [publish](#input\_publish) | Determines whether to set a version of the state machine when it is created. | `bool` | `false` | no | +| [region](#input\_region) | Region where the resource(s) will be managed. Defaults to the region set in the provider configuration | `string` | `null` | no | | [role\_arn](#input\_role\_arn) | The Amazon Resource Name (ARN) of the IAM role to use for this Step Function | `string` | `""` | no | | [role\_description](#input\_role\_description) | Description of IAM role to use for Step Function | `string` | `null` | no | | [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 | diff --git a/examples/complete/README.md b/examples/complete/README.md index 017f398..f1cde7c 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -22,8 +22,8 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.61 | +| [terraform](#requirement\_terraform) | >= 1.5.7 | +| [aws](#requirement\_aws) | >= 6.0 | | [null](#requirement\_null) | >= 2 | | [random](#requirement\_random) | >= 2 | @@ -31,7 +31,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.61 | +| [aws](#provider\_aws) | >= 6.0 | | [null](#provider\_null) | >= 2 | | [random](#provider\_random) | >= 2 | @@ -41,7 +41,7 @@ Note that this example may create resources which cost money. Run `terraform des |------|--------|---------| | [disabled\_step\_function](#module\_disabled\_step\_function) | ../../ | n/a | | [kms](#module\_kms) | terraform-aws-modules/kms/aws | ~> 1.0 | -| [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 2.0 | +| [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 8.0 | | [step\_function](#module\_step\_function) | ../../ | n/a | | [step\_function\_with\_existing\_log\_group](#module\_step\_function\_with\_existing\_log\_group) | ../../ | n/a | diff --git a/examples/complete/main.tf b/examples/complete/main.tf index b371b3d..65059e1 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -241,12 +241,12 @@ resource "null_resource" "download_package" { module "lambda_function" { source = "terraform-aws-modules/lambda/aws" - version = "~> 2.0" + version = "~> 8.0" function_name = "${random_pet.this.id}-lambda" description = "My awesome lambda function" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.12" publish = true diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index 799ca4b..f3c7855 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.5.7" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.61" + version = ">= 6.0" } random = { source = "hashicorp/random" diff --git a/main.tf b/main.tf index 48ac874..f20f9d9 100644 --- a/main.tf +++ b/main.tf @@ -15,6 +15,8 @@ locals { resource "aws_sfn_state_machine" "this" { count = var.create ? 1 : 0 + region = var.region + name = var.name role_arn = var.use_existing_role ? var.role_arn : aws_iam_role.this[0].arn @@ -323,6 +325,8 @@ data "aws_cloudwatch_log_group" "sfn" { resource "aws_cloudwatch_log_group" "sfn" { count = var.create && local.enable_logging && !var.use_existing_cloudwatch_log_group ? 1 : 0 + region = var.region + name = coalesce(var.cloudwatch_log_group_name, "/aws/vendedlogs/states/${var.name}") retention_in_days = var.cloudwatch_log_group_retention_in_days kms_key_id = var.cloudwatch_log_group_kms_key_id diff --git a/variables.tf b/variables.tf index fa5fc61..479a842 100644 --- a/variables.tf +++ b/variables.tf @@ -26,6 +26,11 @@ variable "use_existing_cloudwatch_log_group" { # Step Function ################ +variable "region" { + description = "Region where the resource(s) will be managed. Defaults to the region set in the provider configuration" + type = string + default = null +} variable "name" { description = "The name of the Step Function" type = string diff --git a/versions.tf b/versions.tf index 97e87e8..db13b0a 100644 --- a/versions.tf +++ b/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.5.7" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.61" + version = ">= 6.0" } } } From d54f8940e5960db6ca061bfc27f55ef95dade38d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 26 Jun 2025 16:14:52 +0000 Subject: [PATCH 2/2] chore(release): version 5.0.0 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [5.0.0](https://github.com/terraform-aws-modules/terraform-aws-step-functions/compare/v4.2.1...v5.0.0) (2025-06-26) ### ⚠ BREAKING CHANGES * Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively (#70) ### Features * Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively ([#70](https://github.com/terraform-aws-modules/terraform-aws-step-functions/issues/70)) ([7562b0d](https://github.com/terraform-aws-modules/terraform-aws-step-functions/commit/7562b0d03b7c1bf9aab9a5fe9b2c81c6e9115e40)) --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82cab10..efb0573 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. +## [5.0.0](https://github.com/terraform-aws-modules/terraform-aws-step-functions/compare/v4.2.1...v5.0.0) (2025-06-26) + + +### ⚠ BREAKING CHANGES + +* Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively (#70) + +### Features + +* Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively ([#70](https://github.com/terraform-aws-modules/terraform-aws-step-functions/issues/70)) ([7562b0d](https://github.com/terraform-aws-modules/terraform-aws-step-functions/commit/7562b0d03b7c1bf9aab9a5fe9b2c81c6e9115e40)) + ## [4.2.1](https://github.com/terraform-aws-modules/terraform-aws-step-functions/compare/v4.2.0...v4.2.1) (2025-01-21)