From 463a7ff5cab37404038eba975af8ca93da98f708 Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Wed, 8 May 2019 12:31:58 -0400 Subject: [PATCH] [rds_instance] don't hardcode license_model choices (#53409) * Don't hardcode license_model choices --- ...3409-rds_instance-remove-hardcoded-license-models.yaml | 3 +++ lib/ansible/modules/cloud/amazon/rds_instance.py | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/53409-rds_instance-remove-hardcoded-license-models.yaml diff --git a/changelogs/fragments/53409-rds_instance-remove-hardcoded-license-models.yaml b/changelogs/fragments/53409-rds_instance-remove-hardcoded-license-models.yaml new file mode 100644 index 0000000000..9f87f782ad --- /dev/null +++ b/changelogs/fragments/53409-rds_instance-remove-hardcoded-license-models.yaml @@ -0,0 +1,3 @@ +bugfixes: + - rds_instance - Don't hardcode the license models because there are accepted values undocumented by AWS. + Rely on the exception handling instead to provide a helpful error for invalid license models. diff --git a/lib/ansible/modules/cloud/amazon/rds_instance.py b/lib/ansible/modules/cloud/amazon/rds_instance.py index 3c8b4401d8..b598a8c155 100644 --- a/lib/ansible/modules/cloud/amazon/rds_instance.py +++ b/lib/ansible/modules/cloud/amazon/rds_instance.py @@ -224,10 +224,8 @@ options: license_model: description: - The license model for the DB instance. - choices: - - license-included - - bring-your-own-license - - general-public-license + - Several options are license-included, bring-your-own-license, and general-public-license. + - This option can also be omitted to default to an accepted value. type: str master_user_password: description: @@ -1090,7 +1088,7 @@ def main(): force_failover=dict(type='bool'), iops=dict(type='int'), kms_key_id=dict(), - license_model=dict(choices=['license-included', 'bring-your-own-license', 'general-public-license']), + license_model=dict(), master_user_password=dict(aliases=['password'], no_log=True), master_username=dict(aliases=['username']), monitoring_interval=dict(type='int'),