Commit b4bca75
authored
fix(rds): enablePerformanceInsights false is ignored when other performance insight properties are set (#37287)
### Issue # (if applicable)
Closes #37051
### Reason for this change
`DatabaseInstanceFromSnapshot` (and other `DatabaseInstanceNew` subclasses) ignores an explicit `enablePerformanceInsights: false` when other Performance Insights properties are also set.
### Description of changes
Replace `||` with `??` in the PI enablement logic so that an explicit `false` is not overridden. Remove the redundant fallback on the CFn property assignment.
### Description of how you validated changes
Added a unit test for `DatabaseInstanceFromSnapshot` with `enablePerformanceInsights: false`. All existing tests pass.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)1 parent 5104256 commit b4bca75
File tree
2 files changed
+18
-4
lines changed- packages/aws-cdk-lib/aws-rds
- lib
- test
2 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
979 | | - | |
980 | | - | |
981 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
982 | 983 | | |
983 | 984 | | |
984 | 985 | | |
| |||
1018 | 1019 | | |
1019 | 1020 | | |
1020 | 1021 | | |
1021 | | - | |
| 1022 | + | |
1022 | 1023 | | |
1023 | 1024 | | |
1024 | 1025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
1751 | 1764 | | |
1752 | 1765 | | |
1753 | 1766 | | |
| |||
0 commit comments