diff --git a/s3-access-logs/policy_data.tf b/s3-access-logs/policy_data.tf index 9b828bd..367ba98 100644 --- a/s3-access-logs/policy_data.tf +++ b/s3-access-logs/policy_data.tf @@ -35,7 +35,7 @@ data "aws_iam_policy_document" "logs_s3" { condition { test = "ArnLike" variable = "aws:SourceArn" - values = [format("arn:%v:logs:%v:%v:*", data.aws_arn.current.partition, var.region, local.account_id)] + values = [format("arn:%v:logs:%v:%v:*", data.aws_arn.current.partition, local.logs_region, local.account_id)] } } statement { @@ -55,7 +55,7 @@ data "aws_iam_policy_document" "logs_s3" { condition { test = "ArnLike" variable = "aws:SourceArn" - values = [format("arn:%v:logs:%v:%v:*", data.aws_arn.current.partition, var.region, local.account_id)] + values = [format("arn:%v:logs:%v:%v:*", data.aws_arn.current.partition, local.logs_region, local.account_id)] } }