Spec-Zone.ru › Chef 17

Ресурс google_logging_folder_log_sinks

[править на GitHub]

Синтаксис

Используется google_logging_folder_log_sinks, чтобы протестировать ресурс Google FolderLogSink.

Примеры

# 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 (https://console.cloud.google.com/apis/library/logging.googleapis.com/).

© 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/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API