Skip to content

Commit

Permalink
some adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
marknet15 committed Feb 3, 2022
1 parent 6e20d97 commit 75b807f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plugins/modules/rds_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def get_current_attributes_with_inconsistent_keys(instance):
if instance.get('PendingModifiedValues', {}).get('Port'):
options['DBPortNumber'] = instance['PendingModifiedValues']['Port']
else:
options['DBPortNumber'] = instance.get('Endpoint', {}).get('Port', None)
options['DBPortNumber'] = instance['Endpoint']['Port']
if instance.get('PendingModifiedValues', {}).get('DBSubnetGroupName'):
options['DBSubnetGroupName'] = instance['PendingModifiedValues']['DBSubnetGroupName']
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
id: "{{ instance_id }}"
state: present
allocated_storage: "{{ io1_modified_allocated_storage }}"
storage_type: "{{ storage_type }}"
db_instance_class: "{{ modified_db_instance_class }}"
backup_retention_period: 2
preferred_backup_window: "05:00-06:00"
Expand All @@ -67,7 +68,7 @@
- assert:
that:
- result.changed
- '"allocated_storage" in result.pending_modified_values or result.allocated_storage == io1_allocated_storage'
- '"allocated_storage" in result.pending_modified_values or result.allocated_storage == io1_modified_allocated_storage'
- '"max_allocated_storage" in result.pending_modified_values or result.max_allocated_storage == 150'
- '"port" in result.pending_modified_values or result.endpoint.port == 1150'
- '"db_instance_class" in result.pending_modified_values or result.db_instance_class == modified_db_instance_class'
Expand All @@ -78,6 +79,7 @@
id: "{{ instance_id }}"
state: present
allocated_storage: "{{ io1_modified_allocated_storage }}"
storage_type: "{{ storage_type }}"
db_instance_class: "{{ modified_db_instance_class }}"
backup_retention_period: 2
preferred_backup_window: "05:00-06:00"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
username: "{{ username }}"
password: "{{ password }}"
db_instance_class: "{{ db_instance_class }}"
allocated_storage: "{{ io1_allocated_storage }}"
storage_type: "{{ storage_type }}"
iops: "{{ iops }}"
allocated_storage: "{{ allocated_storage }}"
register: result

- assert:
Expand All @@ -44,9 +42,7 @@
username: "{{ username }}"
password: "{{ password }}"
db_instance_class: "{{ db_instance_class }}"
allocated_storage: "{{ io1_allocated_storage }}"
storage_type: "{{ storage_type }}"
iops: "{{ iops }}"
allocated_storage: "{{ allocated_storage }}"
apply_immediately: True
register: result

Expand All @@ -65,9 +61,7 @@
username: "{{ username }}"
password: "{{ password }}"
db_instance_class: "{{ db_instance_class }}"
allocated_storage: "{{ io1_allocated_storage }}"
storage_type: "{{ storage_type }}"
iops: "{{ iops }}"
allocated_storage: "{{ allocated_storage }}"
apply_immediately: True
register: result

Expand Down

0 comments on commit 75b807f

Please sign in to comment.