cloudposse / terraform-aws-s3-bucket

Terraform module that creates an S3 bucket with an optional IAM user for external CI/CD systems
https://cloudposse.com/accelerate
Apache License 2.0
168 stars 838 forks source link

fix: s3 lambda event notification assignments #253

Closed mpajuelofernandez closed 2 months ago

mpajuelofernandez commented 2 months ago

what

It seems there is a typo kind if error here

dynamic "lambda_function" {
    for_each = var.event_notification_details.lambda_list
    content {
      lambda_function_arn = lambda_function.value.arn
      events              = lambda.value.events
      filter_prefix       = lambda_function.value.filter_prefix
      filter_suffix       = lambda_function.value.filter_suffix
    }
  }

I think it should be

dynamic "lambda_function" {
    for_each = var.event_notification_details.lambda_list
    content {
      lambda_function_arn = lambda_function.value.arn
      events              = lambda_function.value.events
      filter_prefix       = lambda_function.value.filter_prefix
      filter_suffix       = lambda_function.value.filter_suffix
    }
  }

why

The S3 notification can not be created unless this is fixed

references

This should fix https://github.com/cloudposse/terraform-aws-s3-bucket/issues/252

Gowiem commented 2 months ago

/terratest

github-actions[bot] commented 2 months ago

These changes were released in v4.7.1.