【发布时间】:2018-10-05 00:32:01
【问题描述】:
我想为具有多个 (> 10) 属性的 DynamoDB 表创建 Terraform 配置。而且我不需要将所有属性作为索引添加到
global_secondary_index 或 local_secondary_index。
但是当我运行terraform plan 命令时,我有下一个错误:
All attributes must be indexed. Unused attributes: ...
我在 validateDynamoDbTableAttributes 函数的 Terraform 存储库中找到了验证检查。
但据我所知,最佳做法是 each table in DynamoDB is limited to a maximum of five global secondary indexes and five local secondary indexes 来自 General Guidelines for Secondary Indexes in DynamoDB。
而且由于我有超过 10 个属性,这对我来说似乎是个问题。
我想了解为什么必须为所有属性编制索引以及如果您有大量属性该怎么办。
谢谢!
【问题讨论】: