Syntax
A google_pubsub_subscriptions
is used to test a Google Subscription resource
Examples
describe google_pubsub_subscriptions(project: 'chef-gcp-inspec') do
its('count') { should be >= 1 }
end
google_pubsub_subscriptions(project: 'chef-gcp-inspec').names.each do |subscription_name|
describe google_pubsub_subscription(project: 'chef-gcp-inspec', name: subscription_name) do
it { should exist }
end
end
Properties
Properties that can be accessed from the google_pubsub_subscriptions
resource:
See googlepubsubsubscription.md for more detailed information
* names
: an array of google_pubsub_subscription
name
* topics
: an array of google_pubsub_subscription
topic
* labels
: an array of google_pubsub_subscription
labels
* push_configs
: an array of google_pubsub_subscription
pushconfig
* `ackdeadlineseconds: an array of
googlepubsubsubscription` ackdeadlineseconds
* `messageretentiondurations: an array of
googlepubsubsubscription` messageretentionduration
* `retainackedmessages: an array of
googlepubsubsubscription` retainackedmessages
* `expirationpolicies: an array of
googlepubsubsubscriptionexpiration_policy
*
deadletterpolicies: an array of
googlepubsubsubscription` deadletterpolicy
Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with where
as a block or a method.
GCP Permissions
Ensure the Cloud Pub/Sub API is enabled for the current project.