|
|
|
|
@ -138,10 +138,14 @@ def main():
|
|
|
|
|
else:
|
|
|
|
|
if not exists:
|
|
|
|
|
new_group = conn.create_db_subnet_group(group_name, desc=group_description, subnet_ids=group_subnets)
|
|
|
|
|
|
|
|
|
|
changed = True
|
|
|
|
|
else:
|
|
|
|
|
changed_group = conn.modify_db_subnet_group(group_name, description=group_description, subnet_ids=group_subnets)
|
|
|
|
|
|
|
|
|
|
# Sort the subnet groups before we compare them
|
|
|
|
|
matching_groups[0].subnet_ids.sort()
|
|
|
|
|
group_subnets.sort()
|
|
|
|
|
if ( (matching_groups[0].name != group_name) or (matching_groups[0].description != group_description) or (matching_groups[0].subnet_ids != group_subnets) ):
|
|
|
|
|
changed_group = conn.modify_db_subnet_group(group_name, description=group_description, subnet_ids=group_subnets)
|
|
|
|
|
changed = True
|
|
|
|
|
except BotoServerError, e:
|
|
|
|
|
module.fail_json(msg = e.error_message)
|
|
|
|
|
|
|
|
|
|
|