|
|
|
@ -119,6 +119,28 @@ options:
|
|
|
|
|
- Maximum number of CloudFormation events to fetch from a stack when creating or updating it.
|
|
|
|
|
default: 200
|
|
|
|
|
version_added: "2.7"
|
|
|
|
|
backoff_delay:
|
|
|
|
|
description:
|
|
|
|
|
- Number of seconds to wait for the next retry.
|
|
|
|
|
default: 3
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
type: int
|
|
|
|
|
required: False
|
|
|
|
|
backoff_max_delay:
|
|
|
|
|
description:
|
|
|
|
|
- Maximum amount of time to wait between retries.
|
|
|
|
|
default: 30
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
type: int
|
|
|
|
|
required: False
|
|
|
|
|
backoff_retries:
|
|
|
|
|
description:
|
|
|
|
|
- Number of times to retry operation.
|
|
|
|
|
- AWS API throttling mechanism fails Cloudformation module so we have to retry a couple of times.
|
|
|
|
|
default: 10
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
type: int
|
|
|
|
|
required: False
|
|
|
|
|
|
|
|
|
|
author: "James S. Martin (@jsmartin)"
|
|
|
|
|
extends_documentation_fragment:
|
|
|
|
@ -578,6 +600,9 @@ def main():
|
|
|
|
|
tags=dict(default=None, type='dict'),
|
|
|
|
|
termination_protection=dict(default=None, type='bool'),
|
|
|
|
|
events_limit=dict(default=200, type='int'),
|
|
|
|
|
backoff_retries=dict(type='int', default=10, required=False),
|
|
|
|
|
backoff_delay=dict(type='int', default=3, required=False),
|
|
|
|
|
backoff_max_delay=dict(type='int', default=30, required=False),
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -649,7 +674,11 @@ def main():
|
|
|
|
|
|
|
|
|
|
# Wrap the cloudformation client methods that this module uses with
|
|
|
|
|
# automatic backoff / retry for throttling error codes
|
|
|
|
|
backoff_wrapper = AWSRetry.jittered_backoff(retries=10, delay=3, max_delay=30)
|
|
|
|
|
backoff_wrapper = AWSRetry.jittered_backoff(
|
|
|
|
|
retries=module.params.get('backoff_retries'),
|
|
|
|
|
delay=module.params.get('backoff_delay'),
|
|
|
|
|
max_delay=module.params.get('backoff_max_delay')
|
|
|
|
|
)
|
|
|
|
|
cfn.describe_stack_events = backoff_wrapper(cfn.describe_stack_events)
|
|
|
|
|
cfn.create_stack = backoff_wrapper(cfn.create_stack)
|
|
|
|
|
cfn.list_change_sets = backoff_wrapper(cfn.list_change_sets)
|
|
|
|
|