Ресурс google_bigquery_datasets
Синтаксис
Используется google_bigquery_datasets для тестирования ресурса Google Dataset.
Примеры
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
Свойства
Свойства, к которым можно получить доступ из ресурса google_bigquery_datasets:
Для получения дополнительной информации см. ресурс google_bigquery_dataset.
dataset_references- массив
google_bigquery_datasetdataset_reference default_partition_expiration_ms- массив
google_bigquery_datasetdefault_partition_expiration_ms etags- массив
google_bigquery_datasetetag friendly_names- массив
google_bigquery_datasetfriendly_name ids- массив
google_bigquery_datasetid labels- массив
google_bigquery_datasetlabels locations- массив
google_bigquery_datasetlocation default_encryption_configurations- массив
google_bigquery_datasetdefault_encryption_configuration
Критерии фильтрации
Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые можно использовать с where как блоком или методом.
Разрешения GCP
Убедитесь, что для текущего проекта включен API BigQuery BigQuery API.
© 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/