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

fix(multiple): existing log buckets in props are ignored #1036

Open
biffgaut opened this issue Dec 7, 2023 · 0 comments
Open

fix(multiple): existing log buckets in props are ignored #1036

biffgaut opened this issue Dec 7, 2023 · 0 comments
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged

Comments

@biffgaut
Copy link
Contributor

biffgaut commented Dec 7, 2023

When you provide an existing log bucket in a BucketProps object, for example in aws-eventbridge-kinesisfirehose-s3, that bucket should be used in the stack as the log bucket for the bucket created by the stack. Instead, the prop value is ignored and the construct still creates a new bucket.

Reproduction Steps

// logBucket is an s3.Bucket resource created somewhere in the stack

new EventbridgeToKinesisFirehoseToS3(stack, 'evtfhss3-existing-log-bucket', {
  eventRuleProps: {
    schedule: events.Schedule.rate(Duration.minutes(5))
  },
  bucketProps: {
    removalPolicy: RemovalPolicy.DESTROY,
    serverAccessLogsBucket: logBucket,    // <- key attribute
  },
  logGroupProps: {
    removalPolicy: RemovalPolicy.DESTROY
  },
});

The resulting template should have 2 buckets - the existing log bucket and the new firehose destination bucket, with logging set up appropriately. Instead, there are three buckets: a log bucket created by the construct, the new firehose destination bucket that is configured to log to the construct created log bucket, and the existing bucket (logBucket) that is not referenced by the pattern in the construct.

Error Log

Environment

  • CDK CLI Version :
  • CDK Framework Version:
  • AWS Solutions Constructs Version :
  • OS :
  • Language :

Other


This is 🐛 Bug Report

@biffgaut biffgaut added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant