Skip to content

Commit

Permalink
fix(dynamodb): update CfnGlobalTable in TableV2 constructor to use th…
Browse files Browse the repository at this point in the history
…is 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*
  • Loading branch information
colifran authored and MrArnoldPalmer committed Sep 8, 2023
1 parent cfa7e88 commit afd3890
Show file tree
Hide file tree
Showing 14 changed files with 1,054 additions and 329 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "34.0.0",
"files": {
"68a3bb36a940031cf3b515e0cad696adef98469abd9e58c2eb45fb68296fcd2e": {
"116ecd47ef9b5b3d293d7b3733b6a742a38eb54e2d54d79f9009fdbbb8c36dff": {
"source": {
"path": "aws-cdk-global-table.template.json",
"packaging": "file"
},
"destinations": {
"current_account-us-east-1": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1",
"objectKey": "68a3bb36a940031cf3b515e0cad696adef98469abd9e58c2eb45fb68296fcd2e.json",
"objectKey": "116ecd47ef9b5b3d293d7b3733b6a742a38eb54e2d54d79f9009fdbbb8c36dff.json",
"region": "us-east-1",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}
},
"Resource": {
"GlobalTable89F068B2": {
"Type": "AWS::DynamoDB::GlobalTable",
"Properties": {
"AttributeDefinitions": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/68a3bb36a940031cf3b515e0cad696adef98469abd9e58c2eb45fb68296fcd2e.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/116ecd47ef9b5b3d293d7b3733b6a742a38eb54e2d54d79f9009fdbbb8c36dff.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -49,14 +49,14 @@
{
"type": "aws:cdk:hasPhysicalName",
"data": {
"Ref": "Resource"
"Ref": "GlobalTable89F068B2"
}
}
],
"/aws-cdk-global-table/Resource": [
"/aws-cdk-global-table/GlobalTable/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "Resource"
"data": "GlobalTable89F068B2"
}
],
"/aws-cdk-global-table/BootstrapVersion": [
Expand Down
Loading

0 comments on commit afd3890

Please sign in to comment.