Skip to content

Commit 21d0a5c

Browse files
authored
fix(dynamodb): table v1 retain replica table if table is retain (#33953)
### Issue # (if applicable) Closes #33952 ### Reason for this change Allow users to retain table replica ### Description of changes By default, we will retain table replica if table is retain. Otherwise, replica will be deleted by default. Users can optionally use the new field to set replica to destroy even if table is retain. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes New integ tests and unit tests ### Checklist - [ ] 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) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0c77cb6 commit 21d0a5c

File tree

50 files changed

+3629
-7945
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3629
-7945
lines changed

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4/index.js

-1
This file was deleted.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8/index.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json

+12-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
"TableName": {
167167
"Ref": "TableCD117FA1"
168168
},
169-
"Region": "us-east-2"
169+
"Region": "us-east-2",
170+
"SkipReplicaDeletion": false
170171
},
171172
"DependsOn": [
172173
"TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRoleBE2B1C1A5DC546D2",
@@ -190,7 +191,8 @@
190191
"TableName": {
191192
"Ref": "TableCD117FA1"
192193
},
193-
"Region": "eu-west-3"
194+
"Region": "eu-west-3",
195+
"SkipReplicaDeletion": false
194196
},
195197
"DependsOn": [
196198
"TableSourceTableAttachedManagedPolicyawscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRoleBE2B1C1A5DC546D2",
@@ -291,7 +293,7 @@
291293
{
292294
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
293295
},
294-
"/1b09badc4e19e59ec158617bd51789ee6ed15cfe942f7a98932d5b6a3a0a0e56.json"
296+
"/db84cdae632e6cba2f8e4a431d3f3a350218ac90c39e5eb62fff4a6737994230.json"
295297
]
296298
]
297299
}

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
"S3Bucket": {
251251
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
252252
},
253-
"S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip"
253+
"S3Key": "beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8.zip"
254254
},
255255
"Handler": "index.onEventHandler",
256256
"Role": {
@@ -313,7 +313,7 @@
313313
"S3Bucket": {
314314
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
315315
},
316-
"S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip"
316+
"S3Key": "beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8.zip"
317317
},
318318
"Handler": "index.isCompleteHandler",
319319
"Role": {

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedtestDefaultTestDeployAssertE7F91F54.assets.json

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)