From 0b6453eb279ae753f050d5c9297d1f1c89c7e153 Mon Sep 17 00:00:00 2001 From: Nathan McKinley Date: Thu, 24 Oct 2019 22:42:06 +0000 Subject: [PATCH] Pubsub expiration policy docs are unclear about what happens. Signed-off-by: Modular Magician --- plugins/modules/gcp_pubsub_subscription.py | 18 ++++++++---------- .../modules/gcp_pubsub_subscription_info.py | 10 ++++------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index ea1c31a..7cad060 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -175,7 +175,8 @@ options: - A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be - used. The minimum allowed value for expirationPolicy.ttl is 1 day. + used. If it is set but left empty, the resource never expires. The minimum allowed + value for expirationPolicy.ttl is 1 day. required: false type: dict version_added: '2.9' @@ -183,10 +184,8 @@ options: ttl: description: - Specifies the "time-to-live" duration for an associated resource. The resource - expires if it is not active for a period of ttl. The definition of "activity" - depends on the type of the associated resource. The minimum and maximum - allowed values for ttl depend on the type of the associated resource, as - well. If ttl is not set, the associated resource never expires. + expires if it is not active for a period of ttl. + - If ttl is not set, the associated resource never expires. - A duration in seconds with up to nine fractional digits, terminated by 's'. - Example - "3.5s". required: false @@ -380,17 +379,16 @@ expirationPolicy: - A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. - The minimum allowed value for expirationPolicy.ttl is 1 day. + If it is set but left empty, the resource never expires. The minimum allowed value + for expirationPolicy.ttl is 1 day. returned: success type: complex contains: ttl: description: - Specifies the "time-to-live" duration for an associated resource. The resource - expires if it is not active for a period of ttl. The definition of "activity" - depends on the type of the associated resource. The minimum and maximum allowed - values for ttl depend on the type of the associated resource, as well. If - ttl is not set, the associated resource never expires. + expires if it is not active for a period of ttl. + - If ttl is not set, the associated resource never expires. - A duration in seconds with up to nine fractional digits, terminated by 's'. - Example - "3.5s". returned: success diff --git a/plugins/modules/gcp_pubsub_subscription_info.py b/plugins/modules/gcp_pubsub_subscription_info.py index 44e51b2..64136e2 100644 --- a/plugins/modules/gcp_pubsub_subscription_info.py +++ b/plugins/modules/gcp_pubsub_subscription_info.py @@ -221,18 +221,16 @@ resources: - A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with - ttl of 31 days will be used. The minimum allowed value for expirationPolicy.ttl - is 1 day. + ttl of 31 days will be used. If it is set but left empty, the resource never + expires. The minimum allowed value for expirationPolicy.ttl is 1 day. returned: success type: complex contains: ttl: description: - Specifies the "time-to-live" duration for an associated resource. The - resource expires if it is not active for a period of ttl. The definition - of "activity" depends on the type of the associated resource. The minimum - and maximum allowed values for ttl depend on the type of the associated - resource, as well. If ttl is not set, the associated resource never expires. + resource expires if it is not active for a period of ttl. + - If ttl is not set, the associated resource never expires. - A duration in seconds with up to nine fractional digits, terminated by 's'. - Example - "3.5s".