-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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 Global Table Version 2 Replicas don't propagate tags to replica #13281
Comments
This can be achieved using the
For example, something like: provider "aws" {
region = "us-east-1"
}
provider "awsalternate" {
region = "us-west-2"
}
data "aws_region" "alternate" {
provider = "awsalternate"
}
data "aws_region" "current" {}
resource "aws_dynamodb_table" "test" {
provider = "awsalternate"
billing_mode = "PAY_PER_REQUEST"
hash_key = "TestTableHashKey"
name = %[1]q
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
attribute {
name = "TestTableHashKey"
type = "S"
}
replica {
region_name = data.aws_region.current.name
}
}
# Set the tag on the replica.
resource "aws_dynamodb_tag" "test" {
resource_arn = replace(aws_dynamodb_table.test.arn, data.aws_region.alternate.name, data.aws_region.current.name)
key = "testkey"
value = "testvalue"
} |
Use of the We could add a resource "aws_dynamodb_table" "test" {
...
replica {
region_name = "us-east-1"
tags = {
Usage = "Primary"
}
}
replica {
region_name = "us-east-2"
tags = {
Usage = "Secondary"
}
}
} and document carefully that this would conflict with use of the |
This functionality has been released in v4.23.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
A switch should be added to the dynamodb replica to propagate tags over to the replica table. Currently the tagging option is available in the UI but tags are empty after creation of a replica.
New or Affected Resource(s)
"aws_dynamodb_table"
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: