Skip to content

Commit afd3890

Browse files
colifranMrArnoldPalmer
authored andcommitted
fix(dynamodb): update CfnGlobalTable in TableV2 constructor to use this instead of scope (#27075)
`CfnGlobalTable` in the constructor of `TableV2` was incorrectly using `scope` instead of `this`. As a result, `TableV2` was not generating correct logical IDs. Closes #27062 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent cfa7e88 commit afd3890

File tree

14 files changed

+1054
-329
lines changed

14 files changed

+1054
-329
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.table-v2-global.js.snapshot/aws-cdk-global-table.assets.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"version": "34.0.0",
33
"files": {
4-
"68a3bb36a940031cf3b515e0cad696adef98469abd9e58c2eb45fb68296fcd2e": {
4+
"116ecd47ef9b5b3d293d7b3733b6a742a38eb54e2d54d79f9009fdbbb8c36dff": {
55
"source": {
66
"path": "aws-cdk-global-table.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-us-east-1": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1",
12-
"objectKey": "68a3bb36a940031cf3b515e0cad696adef98469abd9e58c2eb45fb68296fcd2e.json",
12+
"objectKey": "116ecd47ef9b5b3d293d7b3733b6a742a38eb54e2d54d79f9009fdbbb8c36dff.json",
1313
"region": "us-east-1",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1"
1515
}

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.table-v2-global.js.snapshot/aws-cdk-global-table.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
}
2121
},
22-
"Resource": {
22+
"GlobalTable89F068B2": {
2323
"Type": "AWS::DynamoDB::GlobalTable",
2424
"Properties": {
2525
"AttributeDefinitions": [

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.table-v2-global.js.snapshot/manifest.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/68a3bb36a940031cf3b515e0cad696adef98469abd9e58c2eb45fb68296fcd2e.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/116ecd47ef9b5b3d293d7b3733b6a742a38eb54e2d54d79f9009fdbbb8c36dff.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [
@@ -49,14 +49,14 @@
4949
{
5050
"type": "aws:cdk:hasPhysicalName",
5151
"data": {
52-
"Ref": "Resource"
52+
"Ref": "GlobalTable89F068B2"
5353
}
5454
}
5555
],
56-
"/aws-cdk-global-table/Resource": [
56+
"/aws-cdk-global-table/GlobalTable/Resource": [
5757
{
5858
"type": "aws:cdk:logicalId",
59-
"data": "Resource"
59+
"data": "GlobalTable89F068B2"
6060
}
6161
],
6262
"/aws-cdk-global-table/BootstrapVersion": [

0 commit comments

Comments
 (0)