Fix rds_instance module… (#56220)
* Fix rds_instance module to run against an (older) existing RDS instance successfully * Only pop Iops param if no storage_type is given. If given and set to wrong type we get to the AWS client error that informs the user * Docs syntax fix * Fix typo in docs Co-Authored-By: stefanhorning <stefan@hornings.de>
This commit is contained in:
parent
79685a4a2d
commit
8c631cbc0a
1 changed files with 5 additions and 2 deletions
|
@ -212,7 +212,7 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
iops:
|
iops:
|
||||||
description:
|
description:
|
||||||
- The Provisioned IOPS (I/O operations per second) value.
|
- The Provisioned IOPS (I/O operations per second) value. Is only set when using I(storage_type) is set to io1.
|
||||||
type: int
|
type: int
|
||||||
kms_key_id:
|
kms_key_id:
|
||||||
description:
|
description:
|
||||||
|
@ -846,6 +846,8 @@ def get_options_with_changing_values(client, module, parameters):
|
||||||
parameters.pop('MasterUserPassword', None)
|
parameters.pop('MasterUserPassword', None)
|
||||||
if cloudwatch_logs_enabled:
|
if cloudwatch_logs_enabled:
|
||||||
parameters['CloudwatchLogsExportConfiguration'] = cloudwatch_logs_enabled
|
parameters['CloudwatchLogsExportConfiguration'] = cloudwatch_logs_enabled
|
||||||
|
if not module.params['storage_type']:
|
||||||
|
parameters.pop('Iops')
|
||||||
|
|
||||||
instance = get_instance(client, module, instance_id)
|
instance = get_instance(client, module, instance_id)
|
||||||
updated_parameters = get_changing_options_with_inconsistent_keys(parameters, instance, purge_cloudwatch_logs)
|
updated_parameters = get_changing_options_with_inconsistent_keys(parameters, instance, purge_cloudwatch_logs)
|
||||||
|
@ -890,7 +892,8 @@ def get_current_attributes_with_inconsistent_keys(instance):
|
||||||
options['DBParameterGroupName'] = [parameter_group['DBParameterGroupName'] for parameter_group in instance['DBParameterGroups']]
|
options['DBParameterGroupName'] = [parameter_group['DBParameterGroupName'] for parameter_group in instance['DBParameterGroups']]
|
||||||
options['AllowMajorVersionUpgrade'] = None
|
options['AllowMajorVersionUpgrade'] = None
|
||||||
options['EnableIAMDatabaseAuthentication'] = instance['IAMDatabaseAuthenticationEnabled']
|
options['EnableIAMDatabaseAuthentication'] = instance['IAMDatabaseAuthenticationEnabled']
|
||||||
options['EnablePerformanceInsights'] = instance['PerformanceInsightsEnabled']
|
# PerformanceInsightsEnabled is not returned on older RDS instances it seems
|
||||||
|
options['EnablePerformanceInsights'] = instance.get('PerformanceInsightsEnabled', False)
|
||||||
options['MasterUserPassword'] = None
|
options['MasterUserPassword'] = None
|
||||||
options['NewDBInstanceIdentifier'] = instance['DBInstanceIdentifier']
|
options['NewDBInstanceIdentifier'] = instance['DBInstanceIdentifier']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue