Skip to content

Commit 9ab3046

Browse files
committed
feat: add policy arn, change layer to layer_arn
1 parent be67f14 commit 9ab3046

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ locals {
5050
}
5151
}
5252

53+
data "aws_partition" "current" {}
54+
5355
variable "region" {
5456
type = string
5557
description = "Lambda Region, not all regions are supported by lambda insights. See source for all supported regions and architectures"
@@ -65,6 +67,10 @@ variable "architecture" {
6567
}
6668
}
6769

68-
output "layer" {
70+
output "layer_arn" {
6971
value = lookup(lookup(local.lambda_insight_layers, var.architecture, {}), var.region, null)
7072
}
73+
74+
output "policy_arn" {
75+
value = "arn:${data.aws_partition.current.partition}:iam::${data.aws_partition.current.partition}:policy/CloudWatchLambdaInsightsExecutionRolePolicy"
76+
}

0 commit comments

Comments
 (0)