@@ -81,7 +81,7 @@ data "aws_iam_policy_document" "bucket_access" {
8181 " s3:HeadObject"
8282 ]
8383 resources = [
84- for bucket_info in module . buckets . buckets_info : " ${ bucket_info . arn } /*"
84+ for buckets_info in module . buckets . buckets_info : " ${ buckets_info . arn } /*"
8585 ]
8686 }
8787
@@ -92,7 +92,7 @@ data "aws_iam_policy_document" "bucket_access" {
9292 " s3:ListBucket"
9393 ]
9494 resources = [
95- for bucket_info in module . buckets . buckets_info : bucket_info . arn
95+ for buckets_info in module . buckets . buckets_info : buckets_info . arn
9696 ]
9797 }
9898}
@@ -108,7 +108,7 @@ resource "aws_lambda_permission" "allow_bucket_primary" {
108108 action = " lambda:InvokeFunction"
109109 function_name = var. ConfirmerLambdaArnPrimary
110110 principal = " s3.amazonaws.com"
111- source_arn = module. buckets . bucket_info [var . PrimaryRegion ]. arn
111+ source_arn = module. buckets . buckets_info [var . PrimaryRegion ]. arn
112112}
113113
114114resource "aws_lambda_permission" "allow_bucket_secondary" {
@@ -117,12 +117,12 @@ resource "aws_lambda_permission" "allow_bucket_secondary" {
117117 action = " lambda:InvokeFunction"
118118 function_name = var. ConfirmerLambdaArnSecondary
119119 principal = " s3.amazonaws.com"
120- source_arn = module. buckets . bucket_info [var . SecondaryRegion ]. arn
120+ source_arn = module. buckets . buckets_info [var . SecondaryRegion ]. arn
121121}
122122
123123
124124resource "aws_s3_bucket_notification" "primary_bucket_notification" {
125- bucket = module. buckets . bucket_info [var . PrimaryRegion ]. id
125+ bucket = module. buckets . buckets_info [var . PrimaryRegion ]. id
126126 lambda_function {
127127 lambda_function_arn = var. ConfirmerLambdaArnPrimary
128128 events = [" s3:ObjectCreated:*" ]
@@ -134,7 +134,7 @@ resource "aws_s3_bucket_notification" "primary_bucket_notification" {
134134
135135
136136resource "aws_s3_bucket_notification" "secondary_bucket_notification" {
137- bucket = module. buckets . bucket_info [var . SecondaryRegion ]. id
137+ bucket = module. buckets . buckets_info [var . SecondaryRegion ]. id
138138 lambda_function {
139139 lambda_function_arn = var. ConfirmerLambdaArnSecondary
140140 events = [" s3:ObjectCreated:*" ]
0 commit comments