Skip to content

Commit

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

[PR #606/038c0474 backport][stable-1.5] ec2_vol: set iops even if unchanged for boto req

Depends-On: #753
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
  • Loading branch information
patchback[bot] authored Apr 12, 2022
1 parent 25cc9fc commit 2a4e9f0
Show file tree
Hide file tree
Showing 3 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 @@ -373,6 +373,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
Empty file.

0 comments on commit 2a4e9f0

Please sign in to comment.