File tree Expand file tree Collapse file tree 5 files changed +13
-3
lines changed Expand file tree Collapse file tree 5 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11repos :
22 - repo : https://github.com/antonbabenko/pre-commit-terraform
3- rev : v1.96.3
3+ rev : v1.98.1
44 hooks :
55 - id : terraform_fmt
66 - id : terraform_wrapper_module_for_each
Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5+ ## [ 7.20.2] ( https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v7.20.1...v7.20.2 ) (2025-04-09)
6+
7+
8+ ### Bug Fixes
9+
10+ * Add aws_partition to support usage of this module in aws-cn and gov ([ 64433c0] ( https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/64433c096e690b767a8b106b67383edfe8263ba7 ) )
11+
512## [ 7.20.1] ( https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v7.20.0...v7.20.1 ) (2025-01-26)
613
714
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ No modules.
137137| [ aws_iam_role.codedeploy] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_role ) | data source |
138138| [ aws_lambda_alias.this] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lambda_alias ) | data source |
139139| [ aws_lambda_function.this] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lambda_function ) | data source |
140+ | [ aws_partition.current] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition ) | data source |
140141
141142## Inputs
142143
Original file line number Diff line number Diff line change 8686
8787}
8888
89+ data "aws_partition" "current" {}
90+
8991data "aws_lambda_alias" "this" {
9092 count = var. create && var. create_deployment ? 1 : 0
9193
@@ -209,7 +211,7 @@ resource "aws_iam_role_policy_attachment" "codedeploy" {
209211 count = var. create && var. create_codedeploy_role ? 1 : 0
210212
211213 role = try (aws_iam_role. codedeploy [0 ]. id , " " )
212- policy_arn = " arn:aws :iam::aws:policy/service-role/AWSCodeDeployRoleForLambda"
214+ policy_arn = " arn:${ data . aws_partition . current . partition } :iam::aws:policy/service-role/AWSCodeDeployRoleForLambda"
213215}
214216
215217data "aws_iam_policy_document" "hooks" {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ output "lambda_function_arn" {
66
77output "lambda_function_arn_static" {
88 description = " The static ARN of the Lambda Function. Use this to avoid cycle errors between resources (e.g., Step Functions)"
9- value = local. create && var. create_function && ! var. create_layer ? " arn:aws :lambda:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :function:${ var . function_name } " : " "
9+ value = local. create && var. create_function && ! var. create_layer ? " arn:${ data . aws_partition . current . partition } :lambda:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :function:${ var . function_name } " : " "
1010}
1111
1212output "lambda_function_invoke_arn" {
You can’t perform that action at this time.
0 commit comments