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 1
1
repos :
2
2
- repo : https://github.com/antonbabenko/pre-commit-terraform
3
- rev : v1.96.3
3
+ rev : v1.98.1
4
4
hooks :
5
5
- id : terraform_fmt
6
6
- id : terraform_wrapper_module_for_each
Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
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
+
5
12
## [ 7.20.1] ( https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v7.20.0...v7.20.1 ) (2025-01-26)
6
13
7
14
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ No modules.
137
137
| [ aws_iam_role.codedeploy] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_role ) | data source |
138
138
| [ aws_lambda_alias.this] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lambda_alias ) | data source |
139
139
| [ 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 |
140
141
141
142
## Inputs
142
143
Original file line number Diff line number Diff line change 86
86
87
87
}
88
88
89
+ data "aws_partition" "current" {}
90
+
89
91
data "aws_lambda_alias" "this" {
90
92
count = var. create && var. create_deployment ? 1 : 0
91
93
@@ -209,7 +211,7 @@ resource "aws_iam_role_policy_attachment" "codedeploy" {
209
211
count = var. create && var. create_codedeploy_role ? 1 : 0
210
212
211
213
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"
213
215
}
214
216
215
217
data "aws_iam_policy_document" "hooks" {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ output "lambda_function_arn" {
6
6
7
7
output "lambda_function_arn_static" {
8
8
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 } " : " "
10
10
}
11
11
12
12
output "lambda_function_invoke_arn" {
You can’t perform that action at this time.
0 commit comments