Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dynamoDB): make TableV2 taggable #31867

Merged
merged 9 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
"KeyId": "alias/aws/kinesis"
}
]
}
},
"Tags": [
{
"Key": "stage",
"Value": "IntegTest"
}
]
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
Expand Down Expand Up @@ -148,6 +154,14 @@
"Region": "us-east-2",
"TableClass": "STANDARD_INFREQUENT_ACCESS",
"Tags": [
{
"Key": "stage",
"Value": "IntegTest"
},
{
"Key": "tagAspectKey",
"Value": "tagAspectValue"
},
{
"Key": "USE2ReplicaTagKey",
"Value": "USE2ReplicaTagValue"
Expand Down Expand Up @@ -184,6 +198,14 @@
"Region": "us-west-2",
"TableClass": "STANDARD",
"Tags": [
{
"Key": "stage",
"Value": "IntegTest"
},
{
"Key": "tagAspectKey",
"Value": "tagAspectValue"
},
{
"Key": "USW2ReplicaTagKey",
"Value": "USW2ReplicaTagValue"
Expand Down Expand Up @@ -231,6 +253,14 @@
"Region": "us-east-1",
"TableClass": "STANDARD_INFREQUENT_ACCESS",
"Tags": [
{
"Key": "stage",
"Value": "IntegTest"
},
{
"Key": "tagAspectKey",
"Value": "tagAspectValue"
},
{
"Key": "primaryTableTagKey",
"Value": "primaryTableTagValue"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { App, RemovalPolicy, Stack, StackProps, Tags } from 'aws-cdk-lib';
import { AttributeType, Billing, Capacity, TableV2, TableClass, TableEncryptionV2 } from 'aws-cdk-lib/aws-dynamodb';
import { Stream } from 'aws-cdk-lib/aws-kinesis';
import { Construct } from 'constructs';
Expand All @@ -10,7 +10,7 @@ class TestStack extends Stack {

const stream = new Stream(this, 'Stream');

new TableV2(this, 'GlobalTable', {
const globalTable = new TableV2(this, 'GlobalTable', {
tableName: 'my-global-table',
partitionKey: { name: 'pk', type: AttributeType.STRING },
sortKey: { name: 'sk', type: AttributeType.NUMBER },
Expand Down Expand Up @@ -68,10 +68,13 @@ class TestStack extends Stack {
],
tags: [{ key: 'primaryTableTagKey', value: 'primaryTableTagValue' }],
});

Tags.of(globalTable).add('tagAspectKey', 'tagAspectValue');
}
}

const app = new App();
Tags.of(app).add('stage', 'IntegTest');
new IntegTest(app, 'aws-cdk-global-table-integ', {
testCases: [new TestStack(app, 'aws-cdk-global-table', { env: { region: 'us-east-1' } })],
regions: ['us-east-1'],
Expand Down
Loading