Skip to content

Commit

Permalink
adjust table_class logic slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
marknet15 committed Jan 22, 2022
1 parent d9373a7 commit fd33eda
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions plugins/modules/dynamodb_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
description:
- The class of the table
choices: ['STANDARD', 'STANDARD_INFREQUENT_ACCESS']
default: 'STANDARD'
type: str
version_added: 3.1.0
tags:
Expand Down Expand Up @@ -777,12 +776,8 @@ def _update_table(current_table):

# Update table_class use exisiting if none is defined
if module.params.get('table_class'):
table_class = module.params.get('table_class')
else:
table_class = current_table.get('table_class')

if table_class != current_table.get('billing_mode'):
changes['TableClass'] = table_class
if module.params.get('table_class') != current_table.get('billing_mode'):
changes['TableClass'] = module.params.get('table_class')

global_index_changes = _global_index_changes(current_table)
if global_index_changes:
Expand Down

0 comments on commit fd33eda

Please sign in to comment.