Ресурс google_compute_vpn_tunnels
Синтаксис
Используется для проверки ресурса Google VpnTunnel.
Ресурс бета-версии
Этот ресурс содержит доступные поля бета-версии. Чтобы получить доступ к этим полям, добавьте в конструктор ресурса.
Примеры
describe google_compute_vpn_tunnels(project: 'chef-gcp-inspec', region: 'europe-west2') do
its('vpn_tunnel_names') { should include 'inspec-vpn-tunnel' }
its('peer_ips') { should include '15.0.0.120' }
end
Проверка, что доступно не более заданного количества vpn_tunnels для проекта и региона
describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('count') { should be <= 100}
end
Проверка, что ожидаемое имя vpn_tunnel доступно для проекта и региона
describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('vpn_tunnel_names') { should include "vpn_tunnel-name" }
end
Проверка, что ожидаемое имя vpn_tunnel target_vpn_gateways отсутствует для проекта и региона
describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('vpn_tunnel_target_vpn_gateways') { should not include "gateway-name" }
end
Свойства
Свойства, к которым можно получить доступ из ресурса:
Дополнительную информацию см. в ресурсе google_compute_vpn_tunnel.
ids- массив
google_compute_vpn_tunnelid creation_timestamps- массив
google_compute_vpn_tunnelcreation_timestamp vpn_tunnel_names- массив
google_compute_vpn_tunnelname descriptions- массив
google_compute_vpn_tunneldescription target_vpn_gateways- массив
google_compute_vpn_tunneltarget_vpn_gateway vpn_gateways- (Только для бета-версии) массив
google_compute_vpn_tunnelvpn_gateway vpn_gateway_interfaces- (Только для бета-версии) массив
google_compute_vpn_tunnelvpn_gateway_interface peer_external_gateways- (Только для бета-версии) массив
google_compute_vpn_tunnelpeer_external_gateway peer_external_gateway_interfaces- (Только для бета-версии) массив
google_compute_vpn_tunnelpeer_external_gateway_interface peer_gcp_gateways- (Только для бета-версии) массив
google_compute_vpn_tunnelpeer_gcp_gateway routers- массив
google_compute_vpn_tunnelrouter peer_ips- массив
google_compute_vpn_tunnelpeer_ip shared_secrets- массив
google_compute_vpn_tunnelshared_secret shared_secret_hashes- массив
google_compute_vpn_tunnelshared_secret_hash ike_versions- массив
google_compute_vpn_tunnelike_version local_traffic_selectors- массив
google_compute_vpn_tunnellocal_traffic_selector remote_traffic_selectors- массив
google_compute_vpn_tunnelremote_traffic_selector labels- (Только для бета-версии) массив
google_compute_vpn_tunnellabels label_fingerprints- (Только для бета-версии) массив
google_compute_vpn_tunnellabel_fingerprint regions- массив
google_compute_vpn_tunnelregion
Критерии фильтрации
Этот ресурс поддерживает все вышеперечисленные свойства в качестве критериев фильтрации, которые могут быть использованы с 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_vpn_tunnels/