title | platform |
---|---|
About the google_logging_project_exclusion Resource |
gcp |
Use the google_logging_project_exclusion
InSpec audit resource to test properties of a single GCP logging project exclusion.
A google_logging_project_exclusion
resource block declares the tests for a single GCP logging project exclusion by project and exclusion name.
describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do
it { should exist }
end
The following examples show how to use this InSpec audit resource.
describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do
its('name') { should eq 'exclusion-name-abcd' }
end
describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do
its('filter') { should eq 'resource.type = gce_instance AND severity <= DEBUG' }
end
describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do
its('description') { should eq 'Exclude GCE instance debug logs' }
end
description
,filter
,name
Ensure the Stackdriver Logging API is enabled for the project.