Skip to content

Commit

Permalink
ec2_instance retry on InsuffienctInstanceCapacity (#1039)
Browse files Browse the repository at this point in the history
`ec2_instance` retry on `InsuffienctInstanceCapacity `

SUMMARY

Closes #1038
Expands the use of the AWSRetry decorator to include InsuffienctInstanceCapacity errors.

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_instance

Reviewed-by: Mark Chappell <None>
  • Loading branch information
briantist authored Sep 20, 2022
1 parent 7ca694f commit 0374961
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/1038-ec2-insufficient-capacity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ec2_instance - expanded the use of the automatic retries to ``InsuffienctInstanceCapacity`` (https://github.com/ansible-collections/amazon.aws/issues/1038).
1 change: 1 addition & 0 deletions plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,7 @@ def main():
retry_decorator = AWSRetry.jittered_backoff(
catch_extra_error_codes=[
'IncorrectState',
'InsuffienctInstanceCapacity',
]
)
client = module.client('ec2', retry_decorator=retry_decorator)
Expand Down

0 comments on commit 0374961

Please sign in to comment.