Skip to content

Commit

Permalink
* Address reviewer's comments
Browse files Browse the repository at this point in the history
	* Add changelog

Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Mar 30, 2021
1 parent 2944522 commit 62e2961
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugins/modules/rds_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,12 @@ def get_changing_options_with_inconsistent_keys(modify_params, instance, purge_c
# TODO: allow other purge_option module parameters rather than just checking for things to add
if isinstance(current_option, list):
if isinstance(desired_option, list):
if set(desired_option) < set(current_option):
if (option == 'DBSecurityGroups' or option == 'VpcSecurityGroupIds') and purge_security_groups:
changing_params[option] = desired_option
if (
set(desired_option) < set(current_option) and
option in ('DBSecurityGroups', 'VpcSecurityGroupIds',) and purge_security_groups
):
changing_params[option] = desired_option
elif set(desired_option) <= set(current_option):
continue
elif isinstance(desired_option, string_types):
if desired_option in current_option:
Expand All @@ -978,7 +981,7 @@ def get_changing_options_with_inconsistent_keys(modify_params, instance, purge_c
format_option['DisableLogTypes'] = list(current_option.difference(desired_option))
if format_option['EnableLogTypes'] or format_option['DisableLogTypes']:
changing_params[option] = format_option
elif option == 'DBSecurityGroups' or option == 'VpcSecurityGroupIds':
elif option in ('DBSecurityGroups', 'VpcSecurityGroupIds',):
if purge_security_groups:
changing_params[option] = desired_option
else:
Expand Down

0 comments on commit 62e2961

Please sign in to comment.