title | platform |
---|---|
About the google_project_metric Resource |
gcp |
Use the google_project_metric
InSpec audit resource to test properties of a single GCP project metric.
A google_project_metric
resource block declares the tests for a single GCP zone by project and name.
describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do
it { should exist }
end
The following examples show how to use this InSpec audit resource.
describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do
it { should exist }
end
describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do
its('filter') { should eq "(protoPayload.serviceName=\"cloudresourcemanager.googleapis.com\")" }
end
filter
,name
,metric_descriptor
Ensure the Stackdriver Logging API is enabled for the project.