Merge pull request #842 from stelligent/devel
fixes issue creating table when no range_key_name is defined
This commit is contained in:
commit
2ca3a8112b
1 changed files with 9 additions and 4 deletions
|
@ -143,10 +143,15 @@ def create_or_update_dynamo_table(connection, module):
|
||||||
read_capacity = module.params.get('read_capacity')
|
read_capacity = module.params.get('read_capacity')
|
||||||
write_capacity = module.params.get('write_capacity')
|
write_capacity = module.params.get('write_capacity')
|
||||||
|
|
||||||
schema = [
|
if range_key_name:
|
||||||
HashKey(hash_key_name, DYNAMO_TYPE_MAP.get(hash_key_type)),
|
schema = [
|
||||||
RangeKey(range_key_name, DYNAMO_TYPE_MAP.get(range_key_type))
|
HashKey(hash_key_name, DYNAMO_TYPE_MAP.get(hash_key_type)),
|
||||||
]
|
RangeKey(range_key_name, DYNAMO_TYPE_MAP.get(range_key_type))
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
schema = [
|
||||||
|
HashKey(hash_key_name, DYNAMO_TYPE_MAP.get(hash_key_type))
|
||||||
|
]
|
||||||
throughput = {
|
throughput = {
|
||||||
'read': read_capacity,
|
'read': read_capacity,
|
||||||
'write': write_capacity
|
'write': write_capacity
|
||||||
|
|
Loading…
Reference in a new issue