title | platform |
---|---|
About the google_logging_project_sinks resource |
gcp |
A google_logging_project_sinks
is used to test a Google ProjectSink resource
describe google_logging_project_sinks(project: 'chef-gcp-inspec') do
its('names') { should include 'inspec-gcp-org-sink' }
end
describe google_logging_project_sinks(project: 'chef-inspec-gcp') do
its('count') { should be <= 100}
end
describe google_logging_project_sinks(project: 'chef-inspec-gcp') do
its('sink_names') { should include "my-sink" }
end
describe google_logging_project_sinks(project: 'chef-inspec-gcp') do
its('sink_destinations') { should include "storage.googleapis.com/a-logging-bucket" }
end
google_logging_project_sinks(project: 'chef-inspec-gcp').where(sink_name: /project/).sink_names.each do |sink_name|
describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: sink_name) do
its('writer_identity') { should eq "serviceAccount:my-logging-service-account.iam.gserviceaccount.com" }
end
end
Properties that can be accessed from the google_logging_project_sinks
resource:
See google_logging_project_sink.md for more detailed information
projects
: an array ofgoogle_logging_project_sink
projectnames
: an array ofgoogle_logging_project_sink
namefilters
: an array ofgoogle_logging_project_sink
filterdestinations
: an array ofgoogle_logging_project_sink
destinationwriter_identities
: an array ofgoogle_logging_project_sink
writer_identityinclude_children
: an array ofgoogle_logging_project_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.