google_pubsub_subscriptions resource
Use the google_pubsub_subscriptions InSpec audit resource to to test a Google Cloud 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 google_pubsub_subscription for more detailed information.
names: an array ofgoogle_pubsub_subscriptionnametopics: an array ofgoogle_pubsub_subscriptiontopiclabels: an array ofgoogle_pubsub_subscriptionlabelspush_configs: an array ofgoogle_pubsub_subscriptionpush_configack_deadline_seconds: an array ofgoogle_pubsub_subscriptionack_deadline_secondsmessage_retention_durations: an array ofgoogle_pubsub_subscriptionmessage_retention_durationretain_acked_messages: an array ofgoogle_pubsub_subscriptionretain_acked_messagesexpiration_policies: an array ofgoogle_pubsub_subscriptionexpiration_policyfilters: an array ofgoogle_pubsub_subscriptionfilterdead_letter_policies: an array ofgoogle_pubsub_subscriptiondead_letter_policyretry_policies: an array ofgoogle_pubsub_subscriptionretry_policyenable_message_orderings: an array ofgoogle_pubsub_subscriptionenable_message_ordering
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.