Skip to content

Commit

Permalink
fix(core): add point in time recovery to X509Certificate DynamoDB tab…
Browse files Browse the repository at this point in the history
…les (#883)
  • Loading branch information
lucaseck authored Nov 2, 2022
1 parent d0a4f86 commit 89523ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/aws-rfdk/lib/core/lib/x509-certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ abstract class X509CertificateBase extends Construct {
removalPolicy: RemovalPolicy.DESTROY,
encryption: TableEncryption.AWS_MANAGED,
billingMode: BillingMode.PAY_PER_REQUEST,
pointInTimeRecovery: true,
});

this.passphrase = new Secret(this, 'Passphrase', {
Expand Down
6 changes: 6 additions & 0 deletions packages/aws-rfdk/lib/core/test/x509-certificate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ test('Generate cert', () => {
},
},
});
// Expect Table to have point in time recovery set to true
Template.fromStack(stack).hasResourceProperties('AWS::DynamoDB::Table', {
PointInTimeRecoverySpecification: {
PointInTimeRecoveryEnabled: true,
},
});

// Should not be any errors.
Annotations.fromStack(stack).hasNoInfo(`/${cert.node.path}`, Match.anyValue());
Expand Down

0 comments on commit 89523ba

Please sign in to comment.