A google_bigquery_datasets is used to test a Google Dataset resource
describe google_bigquery_datasets(project: 'chef-gcp-inspec') do
its('count') { should be >= 1 }
its('friendly_names') { should include 'A BigQuery dataset test' }
its('locations') { should include 'EU' }
end
google_bigquery_datasets(project: 'chef-gcp-inspec').ids.each do |name|
google_bigquery_dataset(project: 'chef-gcp-inspec', name: name.split(':').last).access.each do |access|
describe access do
# No bigquery dataset should allow access to allUsers
its('iam_member') { should_not cmp 'allUsers' }
end
end
end
Properties that can be accessed from the google_bigquery_datasets resource:
See the google_bigquery_dataset resource for more information.
dataset_referencesgoogle_bigquery_dataset dataset_referencedefault_partition_expiration_msgoogle_bigquery_dataset default_partition_expiration_msetagsgoogle_bigquery_dataset etagfriendly_namesgoogle_bigquery_dataset friendly_nameidsgoogle_bigquery_dataset idlabelsgoogle_bigquery_dataset labelslocationsgoogle_bigquery_dataset locationdefault_encryption_configurationsgoogle_bigquery_dataset default_encryption_configurationThis resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.
Ensure the BigQuery API is enabled for the current project.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_bigquery_datasets/