turbot / steampipe-plugin-gcp

Use SQL to instantly query GCP resources across regions, projects and organizations. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/gcp
Apache License 2.0
39 stars 24 forks source link

pubsub subscription retry policy is not retrieved #551

Closed mvanholsteijn closed 5 months ago

mvanholsteijn commented 5 months ago

Describe the bug the fields retry_policy_maximum_backoff, retry_policy_minimum_backoff of the table gcp_pubsub_subscription is always NULL.

SELECT name, topic, retry_policy_maximum_backoff, retry_policy_minimum_backoff 
FROM gcp_pubsub_subscription

Steampipe version (steampipe -v) v0.22.0

Plugin version (steampipe plugin list) v0.49.0

To reproduce create a pubsub subscription with a retry policy. The following query will always return that subscription.

SELECT name, topic, retry_policy_maximum_backoff, retry_policy_minimum_backoff 
FROM gcp_pubsub_subscription
WHERE retry_policy_maximum_backoff is not null OR
              retry_policy_minimum_backoff  is not null

Expected behavior the pubsub subscription shows the min and max backoff.

Additional context None. It is a simple bug. The plugin tries to read the retry config from the PushConfig, but the RetryPolicy is defined on the pubsub object itself. See https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/create#request-body