Skip to content

Commit 19664ae

Browse files
authored
chore(dynamodb): explicitly render false pointInTimeRecovery (#19757)
Today, if the property `pointInTimeRecoveryEnabled` is either `undefined`, or `false`, we don't render the `pointInTimeRecoverySpecification` property in the Table L1. A customer wants to write an Aspect that checks whether this property has been set, and they cannot differentiate between the "not provided" and "set to `false`" cases. Change the logic to render `pointInTimeRecoverySpecification` even for `false` pointInTimeRecoveryEnabled values. Fixes #19748 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 876ed8a commit 19664ae

File tree

1 file changed

+1
-1
lines changed
  • packages/@aws-cdk/aws-dynamodb/lib

1 file changed

+1
-1
lines changed

packages/@aws-cdk/aws-dynamodb/lib/table.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ export class Table extends TableBase {
11831183
attributeDefinitions: this.attributeDefinitions,
11841184
globalSecondaryIndexes: Lazy.any({ produce: () => this.globalSecondaryIndexes }, { omitEmptyArray: true }),
11851185
localSecondaryIndexes: Lazy.any({ produce: () => this.localSecondaryIndexes }, { omitEmptyArray: true }),
1186-
pointInTimeRecoverySpecification: props.pointInTimeRecovery ? { pointInTimeRecoveryEnabled: props.pointInTimeRecovery } : undefined,
1186+
pointInTimeRecoverySpecification: props.pointInTimeRecovery != null ? { pointInTimeRecoveryEnabled: props.pointInTimeRecovery } : undefined,
11871187
billingMode: this.billingMode === BillingMode.PAY_PER_REQUEST ? this.billingMode : undefined,
11881188
provisionedThroughput: this.billingMode === BillingMode.PAY_PER_REQUEST ? undefined : {
11891189
readCapacityUnits: props.readCapacity || 5,

0 commit comments

Comments
 (0)