Spec-Zone.ru › Chef 16

Ресурс google_compute_forwarding_rules

Синтаксис

Для проверки ресурса Google ForwardingRule используется google_compute_forwarding_rules

Ресурс бета-версии

У данного ресурса доступны поля бета-версии. Для получения этих полей включите beta: true в конструктор ресурса

Примеры

describe google_compute_forwarding_rules(project: 'chef-gcp-inspec', region: 'europe-west2') do
  its('forwarding_rule_names') { should include 'udp-forwarding-rule' }
end

Проверка, что доступно не более заданного количества правил переадресации для проекта и региона

describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
  its('count') { should be <= 100}
end

Проверка, что ожидаемый идентификатор правила переадресации присутствует в проекте и регионе

describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
  its('forwarding_rule_ids') { should include 12345678975432 }
end

Проверка, что ожидаемое имя правила переадресации доступно для проекта и региона

describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
  its('forwarding_rule_names') { should include "forwarding_rule-name" }
end

Проверка, что ожидаемое имя сети правила переадресации отсутствует для проекта и региона

describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
  its('forwarding_rule_networks') { should not include "network-name" }
end

Свойства

Свойства, к которым можно получить доступ из ресурса google_compute_forwarding_rules:

Для получения дополнительной информации см. ресурс google_compute_forwarding_rule.

creation_timestamps
массив значений google_compute_forwarding_rule creation_timestamp
is_mirroring_collectors
(Только бета-версия) массив значений google_compute_forwarding_rule is_mirroring_collector
descriptions
массив значений google_compute_forwarding_rule description
forwarding_rule_ids
массив значений google_compute_forwarding_rule id
ip_addresses
массив значений google_compute_forwarding_rule ip_address
ip_protocols
массив значений google_compute_forwarding_rule ip_protocol
backend_services
массив значений google_compute_forwarding_rule backend_service
forwarding_rule_load_balancing_schemes
массив значений google_compute_forwarding_rule load_balancing_scheme
forwarding_rule_names
массив значений google_compute_forwarding_rule name
forwarding_rule_networks
массив значений google_compute_forwarding_rule network
port_ranges
массив значений google_compute_forwarding_rule port_range
ports
массив значений google_compute_forwarding_rule ports
subnetworks
массив значений google_compute_forwarding_rule subnetwork
targets
массив значений google_compute_forwarding_rule target
allow_global_accesses
массив значений google_compute_forwarding_rule allow_global_access
labels
(Только бета-версия) массив значений google_compute_forwarding_rule labels
label_fingerprints
(Только бета-версия) массив значений google_compute_forwarding_rule label_fingerprint
all_ports
массив значений google_compute_forwarding_rule all_ports
network_tiers
массив значений google_compute_forwarding_rule network_tier
service_labels
массив значений google_compute_forwarding_rule service_label
service_names
массив значений google_compute_forwarding_rule service_name
regions
массив значений google_compute_forwarding_rule region

Критерии фильтрации

Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые могут быть использованы с where в виде блока или метода.

Разрешения GCP

Убедитесь, что API Compute Engine включен для текущего проекта.

© 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_forwarding_rules/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API