-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Creating aws_dynamodb_table with replicas attribute does not modify state information for replicas #15409
Comments
Hi @asheynkmantyler, I'm curious - how would you like to use the replica information in the state? I'm asking as I have an issue where I would like to obtain ARNs of the replica tables (e.g. so I can setup IAM policies for them) and/or replica tables streams ARNs and currently I have to manually assemble ARNs for replica tables, e.g.:
If your issue is not about accessing attributes of the replica tables (like in my example above) then I guess I need to open separate ticket for use case. |
My issue arose when we tried to use same terraform plan for production and dr. When we ran the plan for the DR, it returned ResourceAlreadyExists error, because it was trying to create DynamoDB table in "dr" region, but from AWS' perspective table was already there because of the replica configuration. |
@asheynkmantyler How did you resolve this, I am facing same issue not able to get the replicated tables state in statefile. |
@asheynkmantyler have you succeeded resolving this issue , I'm facing the same problem where I need to retrieve the stream_arn for the replica tables |
This functionality has been released in v4.54.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
Terraform CLI and Terraform AWS Provider Version
Terraform v0.13.3
Affected Resource(s)
Terraform Configuration Files
Terraform script:
Terraform state file:
Expected Behavior
Since AWS actually creates a table in the region specified in "replicas" I expected state file to contain information block about dynamodb table in replicated region. Otherwise that part of resource cannot be managed via terraform without importing it manually.
Actual Behavior
Terraform state does not contain information about replica dynamo db.
Steps to Reproduce
terraform apply
Important Factoids
It works appropriately with DynamoDB tables version 2017, using example provided in aws_dynamodb_global_table documentation. It doesn't with aws_dynamodb global tables version 2019.
The text was updated successfully, but these errors were encountered: