google_compute_vpn_tunnels resource
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 vpn_tunnel target_vpn_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 google_compute_vpn_tunnel for more detailed information.
ids: an array ofgoogle_compute_vpn_tunnelidcreation_timestamps: an array ofgoogle_compute_vpn_tunnelcreation_timestampvpn_tunnel_names: an array ofgoogle_compute_vpn_tunnelnamedescriptions: an array ofgoogle_compute_vpn_tunneldescriptiontarget_vpn_gateways: an array ofgoogle_compute_vpn_tunneltarget_vpn_gatewayvpn_gateways: an array ofgoogle_compute_vpn_tunnelvpn_gatewayvpn_gateway_interfaces: an array ofgoogle_compute_vpn_tunnelvpn_gateway_interfacepeer_external_gateways: an array ofgoogle_compute_vpn_tunnelpeer_external_gatewaypeer_external_gateway_interfaces: an array ofgoogle_compute_vpn_tunnelpeer_external_gateway_interfacepeer_gcp_gateways: an array ofgoogle_compute_vpn_tunnelpeer_gcp_gatewayrouters: an array ofgoogle_compute_vpn_tunnelrouterpeer_ips: an array ofgoogle_compute_vpn_tunnelpeer_ipshared_secrets: an array ofgoogle_compute_vpn_tunnelshared_secretshared_secret_hashes: an array ofgoogle_compute_vpn_tunnelshared_secret_hashike_versions: an array ofgoogle_compute_vpn_tunnelike_versionlocal_traffic_selectors: an array ofgoogle_compute_vpn_tunnellocal_traffic_selectorremote_traffic_selectors: an array ofgoogle_compute_vpn_tunnelremote_traffic_selectorlabels: (Beta only) an array ofgoogle_compute_vpn_tunnellabelslabel_fingerprints: (Beta only) an array ofgoogle_compute_vpn_tunnellabel_fingerprintregions: an array ofgoogle_compute_vpn_tunnelregion
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.