Syntax
A google_compute_vpn_tunnels
is used to test a Google VpnTunnel resource
Beta Resource
This resource has beta fields available. To retrieve these fields, include beta: true
in the constructor for the resource
Examples
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
Test that there are no more than a specified number of vpn_tunnels available for the project and region
describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('count') { should be <= 100}
end
Test that an expected vpn_tunnel name is available for the project and region
describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('vpn_tunnel_names') { should include "vpn_tunnel-name" }
end
Test that an expected vpntunnel targetvpn_gateways name is not present for the project and region
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
Properties
Properties that can be accessed from the google_compute_vpn_tunnels
resource:
See googlecomputevpn_tunnel.md for more detailed information
* ids
: an array of google_compute_vpn_tunnel
id
* creation_timestamps
: an array of google_compute_vpn_tunnel
creationtimestamp
* `vpntunnelnames: an array of
googlecomputevpntunnelname
*
descriptions: an array of
googlecomputevpntunneldescription
*
targetvpngateways: an array of
googlecomputevpntunneltarget_vpn_gateway
*
vpngateways: (Beta only) an array of
googlecomputevpntunnelvpn_gateway
*
vpngatewayinterfaces: (Beta only) an array of
googlecomputevpntunnel` vpngatewayinterface
* `peerexternalgateways: (Beta only) an array of
googlecomputevpntunnelpeer_external_gateway
*
peerexternalgatewayinterfaces: (Beta only) an array of
googlecomputevpntunnelpeer_external_gateway_interface
*
peergcpgateways: (Beta only) an array of
googlecomputevpntunnel` peergcpgateway
* routers
: an array of `googlecomputevpntunnelrouter
*
peerips: an array of
googlecomputevpntunnelpeer_ip
*
sharedsecrets: an array of
googlecomputevpntunnelshared_secret
*
sharedsecrethashes: an array of
googlecomputevpntunnel` sharedsecrethash
* `ikeversions: an array of
googlecomputevpntunnel` ikeversion
* local_traffic_selectors
: an array of google_compute_vpn_tunnel
localtrafficselector
* remote_traffic_selectors
: an array of google_compute_vpn_tunnel
remotetrafficselector
* labels
: (Beta only) an array of google_compute_vpn_tunnel
labels
* label_fingerprints
: (Beta only) an array of google_compute_vpn_tunnel
labelfingerprint
* regions
: an array of `googlecomputevpntunnel` region
Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with where
as a block or a method.
GCP Permissions
Ensure the Compute Engine API is enabled for the current project.