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

(dynamodb): Tags not propagated to CfnGlobalTable #25443

Open
peterwoodworth opened this issue May 4, 2023 · 2 comments
Open

(dynamodb): Tags not propagated to CfnGlobalTable #25443

peterwoodworth opened this issue May 4, 2023 · 2 comments
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@peterwoodworth
Copy link
Contributor

Describe the bug

Tags are not propagated to CfnGlobalTable despite it being a taggable resource

Expected Behavior

I expect tags to be created on my Global Tables

Current Behavior

Tags are not created on Global Tables

Reproduction Steps

Attempt to tag to a CfnGlobalTable

    const table = new ddb.CfnGlobalTable(this, 'GlobalTable', {
      attributeDefinitions: [
        {
          attributeName: 'id',
          attributeType: 'string'
        }
      ],
      keySchema: [
        {
          attributeName: 'name',
          keyType: 'HASH'
        }
      ],
      replicas: [
        {
          region: 'us-east-2'
        }
      ]
    });
    Tags.of(table).add('key', 'value');

Possible Solution

This doesn't work because tags are a second level property of CfnGlobalTable - tags are applied per replica https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaspecification.html

Additional Information/Context

No response

CDK CLI Version

2.78.0

Framework Version

No response

Node.js Version

.

OS

.

Language

Typescript

Language Version

No response

Other information

No response

@peterwoodworth peterwoodworth added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 4, 2023
@github-actions github-actions bot added the @aws-cdk/aws-dynamodb Related to Amazon DynamoDB label May 4, 2023
@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort @aws-cdk/aws-dynamodb Related to Amazon DynamoDB and removed @aws-cdk/aws-dynamodb Related to Amazon DynamoDB needs-triage This issue or PR still needs to be triaged. labels May 4, 2023
@peterwoodworth
Copy link
Contributor Author

Tags are also not applied to replicas when using the L2 Table construct to create replicas. That's a separate issue being tracked here

@GavinZZ GavinZZ assigned GavinZZ and unassigned GavinZZ Jan 23, 2024
@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 23, 2024

Quick note, the CfnGlobalTable is auto-generated from CloudFormation schema. Seems that Tags property is missing from the schema, and I also can't find the property on official documentation. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#aws-resource-dynamodb-globaltable-syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

2 participants