feat(dynamodb): allow setting TableClass for a Table#18719
feat(dynamodb): allow setting TableClass for a Table#18719mergify[bot] merged 8 commits intoaws:masterfrom arjanschaaf:master
Conversation
|
Is everything good ? Any idea on when this feature will be merged ? |
madeline-k
left a comment
There was a problem hiding this comment.
Thanks for opening this PR - @arjanschaaf! Here's my feedback.
@skinny85, the dynamodb owner, might also take a look as well.
|
|
||
| /** | ||
| * Specifiy the table class. | ||
| * @default STANDARD else STANDARD_INFREQUENT_ACCESS |
There was a problem hiding this comment.
Why is the else part necessary here?
| * @default STANDARD else STANDARD_INFREQUENT_ACCESS | |
| * @default STANDARD |
| partitionKey: TABLE_PARTITION_KEY, | ||
| }); | ||
|
|
||
| Template.fromStack(stack).hasResourceProperties('AWS::DynamoDB::Table', |
There was a problem hiding this comment.
In this test, we should also verify that a TableClass property is not present in the resulting template:
Template.fromStack(stack).hasResourceProperties('AWS::DynamoDB::Table', Match.not(
{
TableClass: Match.anyValue(),
}),
);There was a problem hiding this comment.
Good point, however I did implement it slightly different with Match.absent().
Pull request has been modified.
skinny85
left a comment
There was a problem hiding this comment.
Looks great @arjanschaaf, thanks so much for the contribution!
Minor comments, mainly around docs and tests.
| * @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.TableClasses.html | ||
| */ | ||
| export enum TableClass { | ||
| /** Default table class for DynamoDB */ |
There was a problem hiding this comment.
Full-stop please:
| /** Default table class for DynamoDB */ | |
| /** Default table class for DynamoDB. */ |
| test('when specifying STANDARD table class', () => { | ||
| const stack = new Stack(); | ||
| new Table(stack, CONSTRUCT_NAME, { | ||
| tableName: TABLE_NAME, |
There was a problem hiding this comment.
Same comment here (we don't need this property).
Pull request has been modified.
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Support already exists in CloudFormation, but hasn't been implemented in CDK. Closes aws#18718 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Support already exists in CloudFormation, but hasn't been implemented in CDK.
Closes #18718
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license