title | platform |
---|---|
About the google_project_alert_policy_condition Resource |
gcp |
Use the google_project_alert_policy_condition
InSpec audit resource to test properties of a single GCP project alert policy condition.
A google_project_alert_policy_condition
resource block declares the tests for a single GCP project alert policy condition by name and filter.
describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do
it { should exist }
end
The following examples show how to use this InSpec audit resource.
describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do
its('condition_threshold_value'){ should eq 0.001 }
end
describe google_project_alert_policy_condition(name: 'projects/spaterson-project/alertPolicies/9271751234503117449', filter 'project=\"spaterson-project\"') do
its('aggregation_alignment_period'){ should eq '60s' }
end
condition_threshold_value
,aggregation_alignment_period
,aggregation_per_series_aligner
,aggregation_cross_series_reducer
Ensure the Stackdriver Logging API is enabled for the project.