From a15141850b6cc78c3ebeffabb34782a81f360979 Mon Sep 17 00:00:00 2001 From: kirylkaminski Date: Mon, 28 Jul 2025 16:00:50 +0300 Subject: [PATCH 1/3] change aws_region data source attribute --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 7a8e529..a388137 100644 --- a/main.tf +++ b/main.tf @@ -7,7 +7,7 @@ locals { sns_topic_arn = try( aws_sns_topic.this[0].arn, - "arn:${data.aws_partition.current.id}:sns:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:${var.sns_topic_name}", + "arn:${data.aws_partition.current.id}:sns:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:${var.sns_topic_name}", "" ) From 636d0050daff7712d1fe3dd15515acf90c01c0b8 Mon Sep 17 00:00:00 2001 From: kirylkaminski Date: Tue, 29 Jul 2025 13:49:16 +0300 Subject: [PATCH 2/3] fix: add aws provider constraints --- examples/cloudwatch-alerts-to-slack/versions.tf | 2 +- examples/notify-slack-simple/versions.tf | 2 +- versions.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/cloudwatch-alerts-to-slack/versions.tf b/examples/cloudwatch-alerts-to-slack/versions.tf index a68b547..263213d 100644 --- a/examples/cloudwatch-alerts-to-slack/versions.tf +++ b/examples/cloudwatch-alerts-to-slack/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.8" + version = ">= 6.0" } random = { source = "hashicorp/random" diff --git a/examples/notify-slack-simple/versions.tf b/examples/notify-slack-simple/versions.tf index 871ac04..398f6c5 100644 --- a/examples/notify-slack-simple/versions.tf +++ b/examples/notify-slack-simple/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.8" + version = ">= 6.0" } local = { source = "hashicorp/local" diff --git a/versions.tf b/versions.tf index 73fac5c..aaf26b8 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.8" + version = ">= 6.0" } } } From b42150eca4f255ef43b23002fc1b74e8b25faabe Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Wed, 30 Jul 2025 12:59:47 +0200 Subject: [PATCH 3/3] Upgraded module version --- README.md | 11 +++++------ examples/cloudwatch-alerts-to-slack/README.md | 6 +++--- examples/cloudwatch-alerts-to-slack/versions.tf | 2 +- examples/notify-slack-simple/README.md | 6 +++--- examples/notify-slack-simple/versions.tf | 2 +- main.tf | 3 +-- variables.tf | 8 +------- versions.tf | 2 +- 8 files changed, 16 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1f830c9..5ee449f 100644 --- a/README.md +++ b/README.md @@ -63,20 +63,20 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.8 | +| [terraform](#requirement\_terraform) | >= 1.5.7 | +| [aws](#requirement\_aws) | >= 6.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.8 | +| [aws](#provider\_aws) | >= 6.0 | ## Modules | Name | Source | Version | |------|--------|---------| -| [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | 6.8.0 | +| [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | 8.0.1 | ## Resources @@ -104,7 +104,6 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif | [create\_sns\_topic](#input\_create\_sns\_topic) | Whether to create new SNS topic | `bool` | `true` | no | | [enable\_sns\_topic\_delivery\_status\_logs](#input\_enable\_sns\_topic\_delivery\_status\_logs) | Whether to enable SNS topic delivery status logs | `bool` | `false` | no | | [hash\_extra](#input\_hash\_extra) | The string to add into hashing function. Useful when building same source path for different functions. | `string` | `""` | no | -| [iam\_policy\_path](#input\_iam\_policy\_path) | Path of policies to that should be added to IAM role for Lambda Function | `string` | `null` | no | | [iam\_role\_boundary\_policy\_arn](#input\_iam\_role\_boundary\_policy\_arn) | The ARN of the policy that is used to set the permissions boundary for the role | `string` | `null` | no | | [iam\_role\_name\_prefix](#input\_iam\_role\_name\_prefix) | A unique role name beginning with the specified prefix | `string` | `"lambda"` | no | | [iam\_role\_path](#input\_iam\_role\_path) | Path of IAM role to use for Lambda Function | `string` | `null` | no | @@ -126,7 +125,7 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif | [putin\_khuylo](#input\_putin\_khuylo) | Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo! | `bool` | `true` | no | | [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no | | [reserved\_concurrent\_executions](#input\_reserved\_concurrent\_executions) | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations | `number` | `-1` | no | -| [runtime](#input\_runtime) | Lambda Function runtime | `string` | `"python3.11"` | no | +| [runtime](#input\_runtime) | Lambda Function runtime | `string` | `"python3.13"` | no | | [slack\_channel](#input\_slack\_channel) | The name of the channel in Slack for notifications | `string` | n/a | yes | | [slack\_emoji](#input\_slack\_emoji) | A custom emoji that will appear on Slack messages | `string` | `":aws:"` | no | | [slack\_username](#input\_slack\_username) | The username that will appear on Slack messages | `string` | n/a | yes | diff --git a/examples/cloudwatch-alerts-to-slack/README.md b/examples/cloudwatch-alerts-to-slack/README.md index ab8bc79..d5ad90d 100644 --- a/examples/cloudwatch-alerts-to-slack/README.md +++ b/examples/cloudwatch-alerts-to-slack/README.md @@ -60,15 +60,15 @@ Note that this example may create resources which can cost money. Run `terraform | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.8 | +| [terraform](#requirement\_terraform) | >= 1.5.7 | +| [aws](#requirement\_aws) | >= 6.0 | | [random](#requirement\_random) | >= 2.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.8 | +| [aws](#provider\_aws) | >= 6.0 | | [random](#provider\_random) | >= 2.0 | ## Modules diff --git a/examples/cloudwatch-alerts-to-slack/versions.tf b/examples/cloudwatch-alerts-to-slack/versions.tf index 263213d..d2f4f3e 100644 --- a/examples/cloudwatch-alerts-to-slack/versions.tf +++ b/examples/cloudwatch-alerts-to-slack/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.5.7" required_providers { aws = { diff --git a/examples/notify-slack-simple/README.md b/examples/notify-slack-simple/README.md index 5f31c35..1cbb7ea 100644 --- a/examples/notify-slack-simple/README.md +++ b/examples/notify-slack-simple/README.md @@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.8 | +| [terraform](#requirement\_terraform) | >= 1.5.7 | +| [aws](#requirement\_aws) | >= 6.0 | | [local](#requirement\_local) | >= 2.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.8 | +| [aws](#provider\_aws) | >= 6.0 | | [local](#provider\_local) | >= 2.0 | ## Modules diff --git a/examples/notify-slack-simple/versions.tf b/examples/notify-slack-simple/versions.tf index 398f6c5..b834623 100644 --- a/examples/notify-slack-simple/versions.tf +++ b/examples/notify-slack-simple/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.5.7" required_providers { aws = { diff --git a/main.tf b/main.tf index a388137..7e2fdf2 100644 --- a/main.tf +++ b/main.tf @@ -88,7 +88,7 @@ resource "aws_sns_topic_subscription" "sns_notify_slack" { module "lambda" { source = "terraform-aws-modules/lambda/aws" - version = "6.8.0" + version = "8.0.1" create = var.create @@ -125,7 +125,6 @@ module "lambda" { role_permissions_boundary = var.iam_role_boundary_policy_arn role_tags = var.iam_role_tags role_path = var.iam_role_path - policy_path = var.iam_policy_path # Do not use Lambda's policy for cloudwatch logs, because we have to add a policy # for KMS conditionally. This way attach_policy_json is always true independenty of diff --git a/variables.tf b/variables.tf index e01be73..7b958e5 100644 --- a/variables.tf +++ b/variables.tf @@ -216,12 +216,6 @@ variable "iam_role_path" { default = null } -variable "iam_policy_path" { - description = "Path of policies to that should be added to IAM role for Lambda Function" - type = string - default = null -} - variable "lambda_function_tags" { description = "Additional tags for the Lambda function" type = map(string) @@ -291,5 +285,5 @@ variable "trigger_on_package_timestamp" { variable "runtime" { description = "Lambda Function runtime" type = string - default = "python3.11" + default = "python3.13" } diff --git a/versions.tf b/versions.tf index aaf26b8..db13b0a 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.5.7" required_providers { aws = {