Spec-Zone.ru › Chef 17

Ресурс google_compute_forwarding_rules

[править на GitHub]

Синтаксис

Используется google_compute_forwarding_rules, чтобы протестировать ресурс Google ForwardingRule.

Ресурс Beta

Этот ресурс имеет доступные поля beta. Чтобы получить доступ к этим полям, включите 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

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

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

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

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

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

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

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

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
(Только beta) массив 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
(Только beta) массив google_compute_forwarding_rule labels
label_fingerprints
(Только beta) массив 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