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

fix: retry policy is defined on the subscription #552

Closed mvanholsteijn closed 5 months ago

mvanholsteijn commented 5 months ago

Integration test logs

Solves issue https://github.com/turbot/steampipe-plugin-gcp/issues/551

Logs ``` No env file present for the current environment: staging Falling back to .env config No env file present for the current environment: staging customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined SETUP: tests/gcp_pubsub_subscription [] PRETEST: tests/gcp_pubsub_subscription TEST: tests/gcp_pubsub_subscription Running terraform Warning: Provider development overrides are in effect The following provider development overrides are set in the CLI configuration: - xebia-cloud/google-secrets in /Users/mvanholsteijn/go/bin The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases. data.google_client_config.current: Reading... data.google_client_config.current: Read complete after 0s [id=projects/"speeltuin-mvanholsteijn"/regions/"us-east1"/zones/"us-east1-b"] data.null_data_source.resource: Reading... data.null_data_source.resource: Read complete after 0s [id=static] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # google_pubsub_subscription.named_test_resource will be created + resource "google_pubsub_subscription" "named_test_resource" { + ack_deadline_seconds = 20 + effective_labels = { + "name" = "turbottest3237" } + id = (known after apply) + labels = { + "name" = "turbottest3237" } + message_retention_duration = "604800s" + name = "turbottest3237" + project = "speeltuin-mvanholsteijn" + terraform_labels = { + "name" = "turbottest3237" } + topic = "turbottest3237" + push_config { + push_endpoint = "https://example.com/push" } } # google_pubsub_subscription_iam_binding.editor will be created + resource "google_pubsub_subscription_iam_binding" "editor" { + etag = (known after apply) + id = (known after apply) + members = [ + "allUsers", ] + project = (known after apply) + role = "roles/editor" + subscription = (known after apply) } # google_pubsub_topic.named_test_resource will be created + resource "google_pubsub_topic" "named_test_resource" { + effective_labels = (known after apply) + id = (known after apply) + name = "turbottest3237" + project = "speeltuin-mvanholsteijn" + terraform_labels = (known after apply) } Plan: 3 to add, 0 to change, 0 to destroy. Changes to Outputs: + etag = (known after apply) + project_id = "speeltuin-mvanholsteijn" + resource_aka = (known after apply) + resource_id = (known after apply) + resource_name = "turbottest3237" + topic_id = (known after apply) google_pubsub_topic.named_test_resource: Creating... google_pubsub_topic.named_test_resource: Creation complete after 6s [id=projects/speeltuin-mvanholsteijn/topics/turbottest3237] google_pubsub_subscription.named_test_resource: Creating... google_pubsub_subscription.named_test_resource: Creation complete after 8s [id=projects/speeltuin-mvanholsteijn/subscriptions/turbottest3237] google_pubsub_subscription_iam_binding.editor: Creating... google_pubsub_subscription_iam_binding.editor: Creation complete after 7s [id=projects/speeltuin-mvanholsteijn/subscriptions/turbottest3237/roles/editor] Warning: Deprecated with data.null_data_source.resource, on variables.tf line 33, in data "null_data_source" "resource": 33: data "null_data_source" "resource" { The null_data_source was historically used to construct intermediate values to re-use elsewhere in configuration, the same can now be achieved using locals or the terraform_data resource type in Terraform 1.4 and later. (and one more similar warning elsewhere) Apply complete! Resources: 3 added, 0 changed, 0 destroyed. Outputs: etag = "BwYUfSr5LmQ=" project_id = "speeltuin-mvanholsteijn" resource_aka = "gcp://pubsub.googleapis.com/projects/speeltuin-mvanholsteijn/subscriptions/turbottest3237" resource_id = "projects/speeltuin-mvanholsteijn/subscriptions/turbottest3237" resource_name = "turbottest3237" topic_id = "projects/speeltuin-mvanholsteijn/topics/turbottest3237" Template Error: undefined The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object ERROR DETECTED: Stopping test run and entering teardown phase. The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object TEARDOWN: tests/gcp_pubsub_subscription SUMMARY: 1/1 passed. ```

Example query results

Results ``` steampipe query 'select count(retry_policy_maximum_backoff), count(retry_policy_minimum_backoff), count(*) from gcp_all.gcp_pubsub_subscription' +-------+-------+-------+ | count | count | count | +-------+-------+-------+ | 190 | 190 | 1500 | +-------+-------+-------+ ```