-
Notifications
You must be signed in to change notification settings - Fork 4k
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 replicated when creating Table replicas #14943
Comments
Hey @ccicchitelli , thanks for opening the issue. You can try applying the Tags this way: const table = new dynamodb.Table(this, 'Table', {
partitionKey: {
name: 'Id',
type: dynamodb.AttributeType.STRING,
},
replicationRegions: ['us-west-1'],
});
const nestedStack = this.node.findChild('@aws-cdk/aws-dynamodb.ReplicaProvider') as NestedStack;
Tags.of(nestedStack).add('abc', 'xyz'); |
Thanks @skinny85 ! That did not have any effect for me, I tested both with an existing table and a new test table. I also tried to find a workaround by running a post-deploy CLI command to tag the relication region by ARN, but my organization doesn't allow that unfortunately. |
@ccicchitelli, thanks for opening this. I actually just experienced this for the first time today myself. I also tried the workaround @skinny85 suggested, and it didn't work for me either. |
Hey all, I believe this is a DynamoDB limitation. The CDK uses the Note that there is a new resource, |
@skinny85 The CDK page for |
Sorry, which page is marked as deprecated? |
The CDK for global tables is marked as deprecated here: https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb-global.GlobalTable.html It asks us to use |
Ah, I see. This is a little confusing, so let me explain 🙂. The page you linked to (https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb-global.GlobalTable.html) is not for the When I say the CDK class for the Hope this clears this up! Thanks, |
I recommend creating an issue on the CloudFormation coverage roadmap so that we can see direct support of this feature |
This issue indicates it is possible to use CloudFormation to specify the tags using ReplicaSpecification object.
|
It seems to me that this issue is describing two different issues:
|
When creating a Global Table in DynamoDB with CDK, tags are not propagated to the replication regions and there is no ability to define tags for those replication regions. As a result, our resources are remediated by internal tools due to missing tags.
Reproduction Steps
When creating a Global Table via CDK, I add the following prop to my Table Construct:
replicationRegions: ["us-east-2"]
Additionally, I have tags defined for the whole the stack:
new AppStack(app, 'DigitalAccountDynamoStack', { tags: { ['deployment_guid']: process.env.bamboo_forge_deployment_guid as string, }});
I have also tried:
Tags.of(app).add('deployment_guid', process.env.bamboo_forge_deployment_guid as string);
As well as:
Tag.add(appStack, 'deployment_guid', process.env.bamboo_forge_deployment_guid as string);
All result in the same: missing tags.
What did you expect to happen?
Tags from the core region should be replicated to the replication regions or there should be a property to manually set the tags.
What actually happened?
Tags are empty in replication regions.
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: