Ресурс google_project_logging_audit_config
Используйте ресурс аудита InSpec google_compute_zone для проверки свойств одной зоны GCP.
Синтаксис
Блок ресурса google_project_logging_audit_config описывает тесты для одной зоны GCP по проекту и имени.
describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do
it { should exist }
end
Примеры
В следующих примерах показано, как использовать этот ресурс аудита InSpec.
Проверка, что конфигурация аудита журнала регистрации проекта GCP имеет определённый тип по умолчанию
describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do
its('default_types') { should include 'ADMIN_READ' }
end
Проверка, что конфигурация аудита журнала регистрации проекта GCP имеет значения по умолчанию для исключённых участников
describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do
it { should_not have_default_exempted_members }
end
Свойства
-
default_types,default_exempted_members
Разрешения GCP
Убедитесь, что API Cloud Resource Manager включён для проекта.
© 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_logging_audit_config/