title | platform |
---|---|
About the google_logging_folder_log_sinks resource |
gcp |
A google_logging_folder_log_sinks
is used to test a Google FolderLogSink resource
# 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
Properties that can be accessed from the google_logging_folder_log_sinks
resource:
See google_logging_folder_log_sink.md for more detailed information
folders
: an array ofgoogle_logging_folder_log_sink
foldernames
: an array ofgoogle_logging_folder_log_sink
namefilters
: an array ofgoogle_logging_folder_log_sink
filterdestinations
: an array ofgoogle_logging_folder_log_sink
destinationwriter_identities
: an array ofgoogle_logging_folder_log_sink
writer_identityinclude_children
: an array ofgoogle_logging_folder_log_sink
include_children
This resource supports all of the above properties as filter criteria, which can be used
with where
as a block or a method.
Ensure the Stackdriver Logging API is enabled for the current project.