Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lamda value has not been declared in event_notification_details #252

Closed
mpajuelofernandez opened this issue Sep 18, 2024 · 0 comments · Fixed by #253
Closed

lamda value has not been declared in event_notification_details #252

mpajuelofernandez opened this issue Sep 18, 2024 · 0 comments · Fixed by #253
Labels
bug 🐛 An issue with the system

Comments

@mpajuelofernandez
Copy link
Contributor

mpajuelofernandez commented Sep 18, 2024

Describe the Bug

when creating a s3 bucket notification, the plan shows the following error:

Error: Reference to undeclared resource
│ 
│   on .terraform/modules/my_bucket.s3_bucket/main.tf line 592, in resource "aws_s3_bucket_notification" "bucket_notification":
│  592:       events              = lambda.value.events
│ 
│ A managed resource "lambda" "value" has not been declared in module.my_bucket.module.s3_bucket.

Expected Behavior

The resource should be created when the event_notifcation_list is enabled

    enabled = true
    lambda_list = [
      {
        lambda_function_arn = "arn:aws:lambda:"
        events = ["s3:ObjectRemoved:*"]
        filter_prefix = ""
        filter_suffix = ""
      },
    ]
    queue_list = []
    topic_list = []
  }

Steps to Reproduce

Just do a call to the module, trying to create a event notification

module "my_bucket" {
  source  = "cloudposse/s3-bucket/aws"
  version = "4.7.0"
  bucket_name = "mybucket"
  event_notification_details = {
    enabled = true
    lambda_list = [
      {
        lambda_function_arn = "arn:aws:lambd"
        events = ["s3:ObjectRemoved:*"]
        filter_prefix = ""
        filter_suffix = ""
      },
    ]
    queue_list = []
    topic_list = []
  }

Screenshots

No response

Environment

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant