A google_project_alert_policies is used to test a Google AlertPolicy resource
describe google_project_alert_policies(project: 'chef-gcp-inspec') do
it { should exist }
its('policy_display_names') { should include 'Display'}
its('combiners') { should include 'OR'}
end
describe google_project_alert_policies(project: 'chef-inspec-gcp') do
its('count') { should be <= 100}
end
describe google_project_alert_policies(project: 'chef-inspec-gcp') do
its('policy_names') { should include 'projects/spaterson-project/alertPolicies/9271751234503117449' }
end
describe google_project_alert_policies(project: 'chef-inspec-gcp') do
its('policy_display_names') { should_not include 'banned policy' }
end
describe google_project_alert_policies(project: 'chef-inspec-gcp') do
its('policy_enabled_states') { should_not include false }
end
Properties that can be accessed from the google_project_alert_policies resource:
See the google_project_alert_policy resource for more information.
policy_namesgoogle_project_alert_policy namepolicy_display_namesgoogle_project_alert_policy display_namecombinersgoogle_project_alert_policy combinercreation_recordsgoogle_project_alert_policy creation_recordpolicy_enabled_statesgoogle_project_alert_policy enabledconditionsgoogle_project_alert_policy conditionsnotification_channelsgoogle_project_alert_policy notification_channelsuser_labelsgoogle_project_alert_policy user_labelsdocumentationsgoogle_project_alert_policy documentationThis 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 Monitoring API is enabled for the current project.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_project_alert_policies/