aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.93k forks source link

(redshift-alpha): setLoggingProperties method for Clusters #22034

Open dontirun opened 2 years ago

dontirun commented 2 years ago

Describe the feature

Add a setLoggingProperties method for Clusters that enables setting the Cluster logging configuration post construction.

Use Case

  1. I have S3 buckets created later in my application
  2. It's easier to conditionally set the logging configuration this way (dev, prod)
  3. I have Redshift Clusters that get passed into a construct that must be configured in certain ways (ex. logging)

Proposed Solution

  1. Add setLoggingProperties to Cluster construct
  2. Method takes in an IBucket and string prefix as parameters
  3. Method throws an error if there is already a logging configuration set, otherwise it adds the logging configuration to the underlying CfnCluster

Other Information

No response

Acknowledgements

CDK version used

N/A

Environment details (OS name and version, etc.)

N/A

peterwoodworth commented 2 years ago

Thanks for the request and PR submission @dontirun, we'll try to review it sooner rather than later 🙂