From a66687f2d293780fdff8dd8ee1311b26b2211880 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Tue, 18 Jun 2019 15:56:01 +1000 Subject: [PATCH] rds_instance: allow empty iops and storage_type (#57943) --- changelogs/fragments/rds_instance_iops_fix.yaml | 2 ++ lib/ansible/modules/cloud/amazon/rds_instance.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/rds_instance_iops_fix.yaml diff --git a/changelogs/fragments/rds_instance_iops_fix.yaml b/changelogs/fragments/rds_instance_iops_fix.yaml new file mode 100644 index 00000000000..35638f2744b --- /dev/null +++ b/changelogs/fragments/rds_instance_iops_fix.yaml @@ -0,0 +1,2 @@ +bugfixes: + - rds_instance no longer fails when passing neither storage_type nor iops diff --git a/lib/ansible/modules/cloud/amazon/rds_instance.py b/lib/ansible/modules/cloud/amazon/rds_instance.py index d4e7b66b274..ac759da677e 100644 --- a/lib/ansible/modules/cloud/amazon/rds_instance.py +++ b/lib/ansible/modules/cloud/amazon/rds_instance.py @@ -847,7 +847,7 @@ def get_options_with_changing_values(client, module, parameters): if cloudwatch_logs_enabled: parameters['CloudwatchLogsExportConfiguration'] = cloudwatch_logs_enabled if not module.params['storage_type']: - parameters.pop('Iops') + parameters.pop('Iops', None) instance = get_instance(client, module, instance_id) updated_parameters = get_changing_options_with_inconsistent_keys(parameters, instance, purge_cloudwatch_logs)