Ресурс google_logging_folder_exclusions
Синтаксис
Для проверки ресурса Google FolderExclusion используется google_logging_folder_exclusions.
Примеры
# Getting folder exclusions is complicated due to the name being generated by the server.
# This can be drastically simplified if you have the name when writing the test
describe.one do
google_resourcemanager_folders(parent: 'organizations/12345').names.each do |name|
# name on a folder is in the form `folders/12345`
describe google_logging_folder_exclusions(folder: name.split('/')[1]) do
its('names'){ should include 'inspec-folder-exclusion' }
its('descriptions'){ should include 'My folder exclusion description' }
its('filters'){ should include 'resource.type = gce_instance AND severity <= DEBUG' }
end
end
end
Свойства
Свойства, доступные для ресурса google_logging_folder_exclusions:
Дополнительную информацию см. в ресурсе google_logging_folder_exclusion.
folders- массив
google_logging_folder_exclusionпапок names- массив
google_logging_folder_exclusionимён descriptions- массив
google_logging_folder_exclusionописаний filters- массив
google_logging_folder_exclusionфильтров disableds- массив
google_logging_folder_exclusionзначений «отключено»
Критерии фильтрации
Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые можно использовать с where в качестве блока или метода.
Разрешения GCP
Убедитесь, что для текущего проекта включен API Stackdriver Logging по адресу Stackdriver Logging 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_logging_folder_exclusions/