Ресурс google_logging_folder_log_sinks
Синтаксис
Для тестирования ресурса Google FolderLogSink используется google_logging_folder_log_sinks.
Примеры
# Getting folder sinks is complicated due to the name being generated by the server.
# This can be drastically simplified if you have the folder name when writing the test
describe.one do
google_resourcemanager_folders(parent: 'organizations/12345').names.each do |folder_name|
# name on a folder is in the form `folders/12345`
describe google_logging_folder_log_sinks(folder: folder_name.split('/')[1]) do
its('names') { should include 'inspec-gcp-folder-sink' }
its('filters') { should include 'resource.type = gce_instance AND severity >= ERROR' }
end
end
end
Свойства
Свойства, доступные для ресурса google_logging_folder_log_sinks:
Дополнительную информацию см. в ресурсе google_logging_folder_log_sink.
folders- массив
google_logging_folder_log_sinkпапок names- массив
google_logging_folder_log_sinkимён filters- массив
google_logging_folder_log_sinkфильтров destinations- массив
google_logging_folder_log_sinkпунктов назначения writer_identities- массив
google_logging_folder_log_sinkидентификаторов писателя include_children- массив
google_logging_folder_log_sinkвключения дочерних элементов
Критерии фильтрации
Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые могут использоваться с 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_log_sinks/