| title | About the google_project_alert_policy Resource |
|---|---|
| platform | gcp |
Use the google_project_alert_policy InSpec audit resource to test properties of a single GCP project alert policy.
A google_project_alert_policy resource block declares the tests for a single GCP project alert policy by name.
describe google_project_alert_policy(policy: 'projects/spaterson-project/alertPolicies/9271751234503117449') do
it { should exist }
end
The following examples show how to use this InSpec audit resource.
describe google_project_alert_policy(policy: 'projects/spaterson-project/alertPolicies/9271751234503117449') do
it { should be_enabled }
end
describe google_project_alert_policy(policy: 'projects/spaterson-project/alertPolicies/9271751234503117449') do
its('display_name') { should eq 'policy name' }
end
combiner,conditions,creation_record,display_name,enabled,mutation_record,name
Ensure the Stackdriver Logging API is enabled for the project.