-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dynamodb): support RemovalPolicy (#3028)
Add support for RemovalPolicy on DynamoDB `Table`s, defaulting to `RemovalPolicy.RETAIN` as the resource is inherently stateful. Fixes #2710
- Loading branch information
1 parent
796d6bb
commit a6175be
Showing
17 changed files
with
295 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
packages/@aws-cdk/aws-dynamodb-global/test/integ.dynamodb.global.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
/// !cdk-integ * | ||
import { AttributeType } from '@aws-cdk/aws-dynamodb'; | ||
import { App } from '@aws-cdk/core'; | ||
import { App, RemovalPolicy } from '@aws-cdk/core'; | ||
import { GlobalTable } from '../lib'; | ||
|
||
const app = new App(); | ||
new GlobalTable(app, 'globdynamodbinteg', { | ||
partitionKey: { name: 'hashKey', type: AttributeType.STRING }, | ||
tableName: 'integrationtest', | ||
regions: [ "us-east-1", "us-east-2", "us-west-2" ] | ||
regions: ["us-east-1", "us-east-2", "us-west-2"], | ||
removalPolicy: RemovalPolicy.DESTROY, | ||
}); | ||
app.synth(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.