-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(rds): add support for monitoring to DatabaseCluster #2828
Conversation
* | ||
* @default no enhanced monitoring | ||
*/ | ||
readonly monitoringInterval?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please annotate this property with a unit. Recommended: monitoringIntervalSec
.
Although @RomainMuller is currently working on a Duration
class which will be the recommended practice going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be also adapted in DatabaseInstance
then.
(breaking)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed that property in DatabaseClusterProps
and in DatabaseInstanceNewProps
as suggested.
I also added the Breaking advise and rebased to master!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rix0rrr I've seen that the Duration
class has landed on master branch so I updated this PR with those required changes. Let me know if you need anything else!
Other than that, looks good! |
b5e78f4
to
6e626c5
Compare
Needs a merge from master, unfortunately :( |
@rix0rrr rebased! |
and rebased again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one tiny addition :)
|
||
let monitoringRole; | ||
if (props.monitoringInterval && props.monitoringInterval.toSeconds()) { | ||
monitoringRole = new Role(this, "MonitoringRole", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice that we default this, but can we also allow specifying this in props
? monitoringRole
is probably a good name for that property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, great!
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
||
let monitoringRole; | ||
if (props.monitoringInterval && props.monitoringInterval.toSeconds()) { | ||
monitoringRole = props.monitoringRole || new Role(this, "MonitoringRole", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have the same optional monitoringRole
for an instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok! done
Let a user define a monitoring interval period. It will be also possible to specify a monitoring IAM Role to manage instances monitoring, otherwise a valid Role will be auto-generated. This change adds optional props `monitoringInterval` and `monitoringRole` to `DatabaseClusterProps` and optional `monitoringRole` to `DatabaseInstanceProps` closes aws#2826
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @rpanfili , and apologies for approving this so late!
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Lets a user specify a monitoring interval period. This change will also auto-generate a valid Role to manage DB instances monitoring.
This change adds an optional prop
monitoringInterval
closes #2826
BREAKING CHANGE:
* rds:
monitoringInterval
inDatabaseInstanceNewProps
has been renamed tomonitoringIntervalSec
Pull Request Checklist
design
folderBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.