Ресурс google_compute_ssl_policies
Синтаксис
Используется google_compute_ssl_policies, чтобы протестировать ресурс Google SslPolicy.
Ресурс бета-версии
У этого ресурса доступны поля бета-версии. Чтобы получить эти поля, добавьте beta: true в конструктор ресурса.
Примеры
describe google_compute_ssl_policies(project: 'chef-gcp-inspec') do
it { should exist }
its('names') { should include 'inspec-gcp-ssl-policy' }
its('profiles') { should include 'CUSTOM' }
its('count') { should eq 1 }
end
google_compute_ssl_policies(project: 'chef-gcp-inspec').names.each do |policy_name|
describe google_compute_ssl_policy(project: 'chef-gcp-inspec', name: policy_name) do
its('min_tls_version') { should eq 'TLS_1_2' }
end
end
Свойства
Свойства, к которым можно получить доступ из ресурса google_compute_ssl_policies:
Дополнительную информацию см. в ресурсе google_compute_ssl_policy.
creation_timestamps- массив
google_compute_ssl_policycreation_timestamp descriptions- массив
google_compute_ssl_policydescription ids- массив
google_compute_ssl_policyid names- массив
google_compute_ssl_policyname profiles- массив
google_compute_ssl_policyprofile min_tls_versions- массив
google_compute_ssl_policymin_tls_version enabled_features- массив
google_compute_ssl_policyenabled_features custom_features- массив
google_compute_ssl_policycustom_features fingerprints- массив
google_compute_ssl_policyfingerprint warnings- массив
google_compute_ssl_policywarnings
Критерии фильтрации
Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые могут использоваться с where в качестве блока или метода.
Разрешения GCP
Убедитесь, что для текущего проекта включен API Compute Engine по адресу Compute Engine API.
© 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_compute_ssl_policies/