Skip to content

Commit

Permalink
ec2_vol: set iops even if unchanged for boto req (#606) (#612)
Browse files Browse the repository at this point in the history
[PR #606/038c0474 backport][stable-2] ec2_vol: set iops even if unchanged for boto req

This is a backport of PR #606 as merged into main (038c047).
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 #605
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
ec2_vol

Reviewed-by: Jill R <None>
Reviewed-by: None <None>
  • Loading branch information
patchback[bot] authored Jan 14, 2022
1 parent 03b80e2 commit 63003a5
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 @@ -384,6 +384,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 63003a5

Please sign in to comment.