From 1e95b7f4ade534016f700d860e7e35181a1a1f93 Mon Sep 17 00:00:00 2001 From: Gabriel PREDA Date: Wed, 26 Oct 2022 18:29:13 +0300 Subject: [PATCH] cloudfront_distribution: add connection_attempts and connection_timeout parameters (#1435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cloudfront_distribution: add connection_attempts and connection_timeout parameters Depends-On: #1569 SUMMARY Missing connection_attempts & connection_timeout. Closes #1434. ISSUE TYPE Docs Pull Request COMPONENT NAME cloudfront_distribution Reviewed-by: Brian Scholer Reviewed-by: Gonéri Le Bouder --- .../1435-connection-attempt-timeout.yml | 2 ++ plugins/modules/cloudfront_distribution.py | 21 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/1435-connection-attempt-timeout.yml diff --git a/changelogs/fragments/1435-connection-attempt-timeout.yml b/changelogs/fragments/1435-connection-attempt-timeout.yml new file mode 100644 index 00000000000..d995590f416 --- /dev/null +++ b/changelogs/fragments/1435-connection-attempt-timeout.yml @@ -0,0 +1,2 @@ +minor_changes: +- cloudfront_distribution - documented `connection_attempts` and `connection_timeout` - the module was already capable of using them diff --git a/plugins/modules/cloudfront_distribution.py b/plugins/modules/cloudfront_distribution.py index 9735e9db3c6..eff7971847c 100644 --- a/plugins/modules/cloudfront_distribution.py +++ b/plugins/modules/cloudfront_distribution.py @@ -168,7 +168,16 @@ origin_keepalive_timeout: description: A keep-alive timeout (in seconds). type: int - + connection_attempts: + description: The number of times that CloudFront attempts to connect to the origin. + The minimum number is C(1), the maximum is C(3). + type: int + default: 3 + connection_timeout: + description: The number of seconds that CloudFront waits when trying to establish a connection to the origin. + The minimum timeout is C(1) second, the maximum is C(10) seconds. + type: int + default: 10 purge_origins: description: Whether to remove any origins that aren't listed in I(origins). default: false @@ -1277,6 +1286,16 @@ returned: always type: str sample: '' + connection_attempts: + description: The number of times that CloudFront attempts to connect to the origin. + returned: always + type: int + sample: 3 + connection_timeout: + description: The number of seconds that CloudFront waits when trying to establish a connection to the origin. + returned: always + type: int + sample: 10 s3_origin_config: description: Origin access identity configuration for S3 Origin. returned: when s3_origin_access_identity_enabled is true