We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b0eff8 commit 42a40bcCopy full SHA for 42a40bc
infrastructure/modules/lambda/main.tf
@@ -33,6 +33,8 @@ resource "aws_cloudwatch_log_group" "lambda_logs" {
33
retention_in_days = 1
34
}
35
36
+data "aws_caller_identity" "current" {}
37
+
38
data "aws_iam_policy_document" "lambda_kms_policy" {
39
statement {
40
sid = "AllowRootAccountAccess"
@@ -41,7 +43,7 @@ data "aws_iam_policy_document" "lambda_kms_policy" {
41
43
principals {
42
44
type = "AWS"
45
identifiers = [
- "arn:aws:iam::${var.account_id}:root"
46
+ "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"
47
]
48
49
0 commit comments