AWS TerraForm DynamoDB还原场景
我将从备份还原DynamoDB表,并且由于AWS不支持将备份还原到同一表,我将进行以下操作:
- 还原表A的备份到新表B
- 备份表B备份表B
- 删除表A
- 还还原表B的备份作为表A
我正在使用Terraform来管理资源。我的问题是:
- 这个会破坏Terraform资源链接/差异,并使下一个部署失败。
- 表A是否可以在仍在恢复的同时接受请求(步骤4)?
- 还可以恢复DynamoDB表吗?
I am going to restore a dynamodb table from backup and as AWS does not support restoring backups to the same table I will do the following:
- Restore table A's backup to a new table B
- Backup table B
- Delete table A
- Restore table B's backup as table A
I am using Terraform to manage resources. My questions are:
- Will this break Terraform resource link/diff and make next deploy fail.
- Will table A be ready to accept request while still being restored (step 4)?
- Are there other best practices to restore a DynamoDB table?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如马克·B(Mark B)所写的那样,您将当然需要将已还原的表导入状态文件。在此之前,您需要删除旧的。
在TF代码中您将引用名称,如下所示,因此新表名称并不重要(除非您将其核对在某个地方)
As Mark B wrote, you will certainly need to import the restored table to the state file. And before that you need to remove the old one.
In the tf code you will be referencing the name as shown below, hence the new table name doesnt really matter (unless you hardocded it somewhere)