-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(dynamodb): Dynamo TableV2 does not work with Tags.of #30631
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-dynamodbRelated to Amazon DynamoDBRelated to Amazon DynamoDBbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
Describe the bug
The aws_dynamodb.TableV2 construct does not support adding tags via Tags.of.
I.e., the following code does not create the myKey tag.
import * as cdk from 'aws-cdk-lib';
import {aws_dynamodb, Tags} from "aws-cdk-lib";
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack');
const globalTable = new aws_dynamodb.TableV2(stack, 'GlobalTable', {
partitionKey: {name: 'pk', type: aws_dynamodb.AttributeType.STRING},
});
Tags.of(globalTable).add('myKey', 'myValue');
Expected Behavior
Creates tag.
Current Behavior
Does not create tag.
Reproduction Steps
import * as cdk from 'aws-cdk-lib';
import {aws_dynamodb, Tags} from "aws-cdk-lib";
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack');
const globalTable = new aws_dynamodb.TableV2(stack, 'GlobalTable', {
partitionKey: {name: 'pk', type: aws_dynamodb.AttributeType.STRING},
});
Tags.of(globalTable).add('myKey', 'myValue');
cdk synth
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.147.0 (build 3338fc0)
Framework Version
No response
Node.js Version
v20.3.1
OS
Macos
Language
TypeScript
Language Version
TypeScript 5.4.5
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-dynamodbRelated to Amazon DynamoDBRelated to Amazon DynamoDBbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2