Skip to content

Commit

Permalink
ec2_vol: set iops even if unchanged for boto req (ansible-collections…
Browse files Browse the repository at this point in the history
…#606)

ec2_vol: set iops even if unchanged for boto req

SUMMARY

Set the iops value in req_obj even if the target iops is the same as the existing. This is a required parameter for boto's modify_volume. Fixes ansible-collections#605
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
ec2_vol

Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
  • Loading branch information
lowlydba authored Jan 12, 2022
1 parent e6b0e71 commit 038c047
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bugfixes:
- >-
ec2_vol - Sets the Iops value in req_obj even if the iops value
has not changed, to allow modifying volume types that require
passing an iops value to boto. (https://github.com/ansible-collections/amazon.aws/pull/606)
2 changes: 2 additions & 0 deletions plugins/modules/ec2_vol.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ def update_volume(module, ec2_conn, volume):
if target_iops != original_iops:
iops_changed = True
req_obj['Iops'] = target_iops
else:
req_obj['Iops'] = original_iops
else:
# If no IOPS value is specified and there was a volume_type update to gp3,
# the existing value is retained, unless a volume type is modified that supports different values,
Expand Down

0 comments on commit 038c047

Please sign in to comment.