Expand description
VPN tunnel resource.
To get more information about VpnTunnel, see:
- API documentation
- How-to Guides
§Example Usage
§Vpn Tunnel Basic
resources:
tunnel1:
type: gcp:compute:VPNTunnel
properties:
name: tunnel-1
peerIp: 15.0.0.120
sharedSecret: a secret message
targetVpnGateway: ${targetGateway.id}
labels:
foo: bar
options:
dependsOn:
- ${frEsp}
- ${frUdp500}
- ${frUdp4500}
targetGateway:
type: gcp:compute:VPNGateway
name: target_gateway
properties:
name: vpn-1
network: ${network1.id}
network1:
type: gcp:compute:Network
properties:
name: network-1
vpnStaticIp:
type: gcp:compute:Address
name: vpn_static_ip
properties:
name: vpn-static-ip
frEsp:
type: gcp:compute:ForwardingRule
name: fr_esp
properties:
name: fr-esp
ipProtocol: ESP
ipAddress: ${vpnStaticIp.address}
target: ${targetGateway.id}
frUdp500:
type: gcp:compute:ForwardingRule
name: fr_udp500
properties:
name: fr-udp500
ipProtocol: UDP
portRange: '500'
ipAddress: ${vpnStaticIp.address}
target: ${targetGateway.id}
frUdp4500:
type: gcp:compute:ForwardingRule
name: fr_udp4500
properties:
name: fr-udp4500
ipProtocol: UDP
portRange: '4500'
ipAddress: ${vpnStaticIp.address}
target: ${targetGateway.id}
route1:
type: gcp:compute:Route
properties:
name: route1
network: ${network1.name}
destRange: 15.0.0.0/24
priority: 1000
nextHopVpnTunnel: ${tunnel1.id}
§Import
VpnTunnel can be imported using any of these accepted formats:
-
projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, VpnTunnel can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/vPNTunnel:VPNTunnel default projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}
$ pulumi import gcp:compute/vPNTunnel:VPNTunnel default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/vPNTunnel:VPNTunnel default {{region}}/{{name}}
$ pulumi import gcp:compute/vPNTunnel:VPNTunnel default {{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments