Ресурс google_compute_autoscalers
Синтаксис
Для проверки ресурса Google Autoscaler используется google_compute_autoscalers
Ресурс бета-версии
Этот ресурс содержит доступные поля бета-версии. Чтобы получить эти поля, включите beta: true в конструктор ресурса
Примеры
autoscalers = google_compute_autoscalers(project: 'chef-gcp-inspec', zone: 'zone')
describe.one do
autoscalers.autoscaling_policies.each do |autoscaling_policy|
describe autoscaling_policy do
its('max_num_replicas') { should eq '5' }
its('min_num_replicas') { should eq '1' }
its('cool_down_period_sec') { should eq '60' }
its('cpu_utilization.utilization_target') { should eq '0.5' }
end
end
end
Свойства
Свойства, к которым можно получить доступ из ресурса google_compute_autoscalers:
Дополнительную информацию см. в ресурсе google_compute_autoscaler.
ids- массив
google_compute_autoscalerid creation_timestamps- массив
google_compute_autoscalercreation_timestamp names- массив
google_compute_autoscalername descriptions- массив
google_compute_autoscalerdescription autoscaling_policies- массив
google_compute_autoscalerautoscaling_policy targets- массив
google_compute_autoscalertarget zones- массив
google_compute_autoscalerzone
Критерии фильтрации
Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые могут использоваться с 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_autoscalers/