Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

ExternalVpnGateway

Represents a VPN gateway managed outside of GCP.

To get more information about ExternalVpnGateway, see:

Example Usage

External Vpn Gateway

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var network = new Gcp.Compute.Network("network", new Gcp.Compute.NetworkArgs
        {
            RoutingMode = "GLOBAL",
            AutoCreateSubnetworks = false,
        });
        var haGateway = new Gcp.Compute.HaVpnGateway("haGateway", new Gcp.Compute.HaVpnGatewayArgs
        {
            Region = "us-central1",
            Network = network.Id,
        });
        var externalGateway = new Gcp.Compute.ExternalVpnGateway("externalGateway", new Gcp.Compute.ExternalVpnGatewayArgs
        {
            RedundancyType = "SINGLE_IP_INTERNALLY_REDUNDANT",
            Description = "An externally managed VPN gateway",
            Interfaces = 
            {
                new Gcp.Compute.Inputs.ExternalVpnGatewayInterfaceArgs
                {
                    Id = 0,
                    IpAddress = "8.8.8.8",
                },
            },
        });
        var networkSubnet1 = new Gcp.Compute.Subnetwork("networkSubnet1", new Gcp.Compute.SubnetworkArgs
        {
            IpCidrRange = "10.0.1.0/24",
            Region = "us-central1",
            Network = network.Id,
        });
        var networkSubnet2 = new Gcp.Compute.Subnetwork("networkSubnet2", new Gcp.Compute.SubnetworkArgs
        {
            IpCidrRange = "10.0.2.0/24",
            Region = "us-west1",
            Network = network.Id,
        });
        var router1 = new Gcp.Compute.Router("router1", new Gcp.Compute.RouterArgs
        {
            Network = network.Name,
            Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
            {
                Asn = 64514,
            },
        });
        var tunnel1 = new Gcp.Compute.VPNTunnel("tunnel1", new Gcp.Compute.VPNTunnelArgs
        {
            Region = "us-central1",
            VpnGateway = haGateway.Id,
            PeerExternalGateway = externalGateway.Id,
            PeerExternalGatewayInterface = 0,
            SharedSecret = "a secret message",
            Router = router1.Id,
            VpnGatewayInterface = 0,
        });
        var tunnel2 = new Gcp.Compute.VPNTunnel("tunnel2", new Gcp.Compute.VPNTunnelArgs
        {
            Region = "us-central1",
            VpnGateway = haGateway.Id,
            PeerExternalGateway = externalGateway.Id,
            PeerExternalGatewayInterface = 0,
            SharedSecret = "a secret message",
            Router = router1.Id.Apply(id => $" {id}"),
            VpnGatewayInterface = 1,
        });
        var router1Interface1 = new Gcp.Compute.RouterInterface("router1Interface1", new Gcp.Compute.RouterInterfaceArgs
        {
            Router = router1.Name,
            Region = "us-central1",
            IpRange = "169.254.0.1/30",
            VpnTunnel = tunnel1.Name,
        });
        var router1Peer1 = new Gcp.Compute.RouterPeer("router1Peer1", new Gcp.Compute.RouterPeerArgs
        {
            Router = router1.Name,
            Region = "us-central1",
            PeerIpAddress = "169.254.0.2",
            PeerAsn = 64515,
            AdvertisedRoutePriority = 100,
            Interface = router1Interface1.Name,
        });
        var router1Interface2 = new Gcp.Compute.RouterInterface("router1Interface2", new Gcp.Compute.RouterInterfaceArgs
        {
            Router = router1.Name,
            Region = "us-central1",
            IpRange = "169.254.1.1/30",
            VpnTunnel = tunnel2.Name,
        });
        var router1Peer2 = new Gcp.Compute.RouterPeer("router1Peer2", new Gcp.Compute.RouterPeerArgs
        {
            Router = router1.Name,
            Region = "us-central1",
            PeerIpAddress = "169.254.1.2",
            PeerAsn = 64515,
            AdvertisedRoutePriority = 100,
            Interface = router1Interface2.Name,
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
			RoutingMode:           pulumi.String("GLOBAL"),
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		haGateway, err := compute.NewHaVpnGateway(ctx, "haGateway", &compute.HaVpnGatewayArgs{
			Region:  pulumi.String("us-central1"),
			Network: network.ID(),
		})
		if err != nil {
			return err
		}
		externalGateway, err := compute.NewExternalVpnGateway(ctx, "externalGateway", &compute.ExternalVpnGatewayArgs{
			RedundancyType: pulumi.String("SINGLE_IP_INTERNALLY_REDUNDANT"),
			Description:    pulumi.String("An externally managed VPN gateway"),
			Interfaces: compute.ExternalVpnGatewayInterfaceArray{
				&compute.ExternalVpnGatewayInterfaceArgs{
					Id:        pulumi.Int(0),
					IpAddress: pulumi.String("8.8.8.8"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = compute.NewSubnetwork(ctx, "networkSubnet1", &compute.SubnetworkArgs{
			IpCidrRange: pulumi.String("10.0.1.0/24"),
			Region:      pulumi.String("us-central1"),
			Network:     network.ID(),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewSubnetwork(ctx, "networkSubnet2", &compute.SubnetworkArgs{
			IpCidrRange: pulumi.String("10.0.2.0/24"),
			Region:      pulumi.String("us-west1"),
			Network:     network.ID(),
		})
		if err != nil {
			return err
		}
		router1, err := compute.NewRouter(ctx, "router1", &compute.RouterArgs{
			Network: network.Name,
			Bgp: &compute.RouterBgpArgs{
				Asn: pulumi.Int(64514),
			},
		})
		if err != nil {
			return err
		}
		tunnel1, err := compute.NewVPNTunnel(ctx, "tunnel1", &compute.VPNTunnelArgs{
			Region:                       pulumi.String("us-central1"),
			VpnGateway:                   haGateway.ID(),
			PeerExternalGateway:          externalGateway.ID(),
			PeerExternalGatewayInterface: pulumi.Int(0),
			SharedSecret:                 pulumi.String("a secret message"),
			Router:                       router1.ID(),
			VpnGatewayInterface:          pulumi.Int(0),
		})
		if err != nil {
			return err
		}
		tunnel2, err := compute.NewVPNTunnel(ctx, "tunnel2", &compute.VPNTunnelArgs{
			Region:                       pulumi.String("us-central1"),
			VpnGateway:                   haGateway.ID(),
			PeerExternalGateway:          externalGateway.ID(),
			PeerExternalGatewayInterface: pulumi.Int(0),
			SharedSecret:                 pulumi.String("a secret message"),
			Router: router1.ID().ApplyT(func(id string) (string, error) {
				return fmt.Sprintf("%v%v", " ", id), nil
			}).(pulumi.StringOutput),
			VpnGatewayInterface: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		router1Interface1, err := compute.NewRouterInterface(ctx, "router1Interface1", &compute.RouterInterfaceArgs{
			Router:    router1.Name,
			Region:    pulumi.String("us-central1"),
			IpRange:   pulumi.String("169.254.0.1/30"),
			VpnTunnel: tunnel1.Name,
		})
		if err != nil {
			return err
		}
		_, err = compute.NewRouterPeer(ctx, "router1Peer1", &compute.RouterPeerArgs{
			Router:                  router1.Name,
			Region:                  pulumi.String("us-central1"),
			PeerIpAddress:           pulumi.String("169.254.0.2"),
			PeerAsn:                 pulumi.Int(64515),
			AdvertisedRoutePriority: pulumi.Int(100),
			Interface:               router1Interface1.Name,
		})
		if err != nil {
			return err
		}
		router1Interface2, err := compute.NewRouterInterface(ctx, "router1Interface2", &compute.RouterInterfaceArgs{
			Router:    router1.Name,
			Region:    pulumi.String("us-central1"),
			IpRange:   pulumi.String("169.254.1.1/30"),
			VpnTunnel: tunnel2.Name,
		})
		if err != nil {
			return err
		}
		_, err = compute.NewRouterPeer(ctx, "router1Peer2", &compute.RouterPeerArgs{
			Router:                  router1.Name,
			Region:                  pulumi.String("us-central1"),
			PeerIpAddress:           pulumi.String("169.254.1.2"),
			PeerAsn:                 pulumi.Int(64515),
			AdvertisedRoutePriority: pulumi.Int(100),
			Interface:               router1Interface2.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var network = new Network("network", NetworkArgs.builder()        
            .routingMode("GLOBAL")
            .autoCreateSubnetworks(false)
            .build());

        var haGateway = new HaVpnGateway("haGateway", HaVpnGatewayArgs.builder()        
            .region("us-central1")
            .network(network.getId())
            .build());

        var externalGateway = new ExternalVpnGateway("externalGateway", ExternalVpnGatewayArgs.builder()        
            .redundancyType("SINGLE_IP_INTERNALLY_REDUNDANT")
            .description("An externally managed VPN gateway")
            .interfaces(ExternalVpnGatewayInterface.builder()
                .id(0)
                .ipAddress("8.8.8.8")
                .build())
            .build());

        var networkSubnet1 = new Subnetwork("networkSubnet1", SubnetworkArgs.builder()        
            .ipCidrRange("10.0.1.0/24")
            .region("us-central1")
            .network(network.getId())
            .build());

        var networkSubnet2 = new Subnetwork("networkSubnet2", SubnetworkArgs.builder()        
            .ipCidrRange("10.0.2.0/24")
            .region("us-west1")
            .network(network.getId())
            .build());

        var router1 = new Router("router1", RouterArgs.builder()        
            .network(network.getName())
            .bgp(RouterBgp.builder()
                .asn(64514)
                .build())
            .build());

        var tunnel1 = new VPNTunnel("tunnel1", VPNTunnelArgs.builder()        
            .region("us-central1")
            .vpnGateway(haGateway.getId())
            .peerExternalGateway(externalGateway.getId())
            .peerExternalGatewayInterface(0)
            .sharedSecret("a secret message")
            .router(router1.getId())
            .vpnGatewayInterface(0)
            .build());

        var tunnel2 = new VPNTunnel("tunnel2", VPNTunnelArgs.builder()        
            .region("us-central1")
            .vpnGateway(haGateway.getId())
            .peerExternalGateway(externalGateway.getId())
            .peerExternalGatewayInterface(0)
            .sharedSecret("a secret message")
            .router(router1.getId().apply(id -> String.format(" %s", id)))
            .vpnGatewayInterface(1)
            .build());

        var router1Interface1 = new RouterInterface("router1Interface1", RouterInterfaceArgs.builder()        
            .router(router1.getName())
            .region("us-central1")
            .ipRange("169.254.0.1/30")
            .vpnTunnel(tunnel1.getName())
            .build());

        var router1Peer1 = new RouterPeer("router1Peer1", RouterPeerArgs.builder()        
            .router(router1.getName())
            .region("us-central1")
            .peerIpAddress("169.254.0.2")
            .peerAsn(64515)
            .advertisedRoutePriority(100)
            .interface_(router1Interface1.getName())
            .build());

        var router1Interface2 = new RouterInterface("router1Interface2", RouterInterfaceArgs.builder()        
            .router(router1.getName())
            .region("us-central1")
            .ipRange("169.254.1.1/30")
            .vpnTunnel(tunnel2.getName())
            .build());

        var router1Peer2 = new RouterPeer("router1Peer2", RouterPeerArgs.builder()        
            .router(router1.getName())
            .region("us-central1")
            .peerIpAddress("169.254.1.2")
            .peerAsn(64515)
            .advertisedRoutePriority(100)
            .interface_(router1Interface2.getName())
            .build());

        }
}
import pulumi
import pulumi_gcp as gcp

network = gcp.compute.Network("network",
    routing_mode="GLOBAL",
    auto_create_subnetworks=False)
ha_gateway = gcp.compute.HaVpnGateway("haGateway",
    region="us-central1",
    network=network.id)
external_gateway = gcp.compute.ExternalVpnGateway("externalGateway",
    redundancy_type="SINGLE_IP_INTERNALLY_REDUNDANT",
    description="An externally managed VPN gateway",
    interfaces=[gcp.compute.ExternalVpnGatewayInterfaceArgs(
        id=0,
        ip_address="8.8.8.8",
    )])
network_subnet1 = gcp.compute.Subnetwork("networkSubnet1",
    ip_cidr_range="10.0.1.0/24",
    region="us-central1",
    network=network.id)
network_subnet2 = gcp.compute.Subnetwork("networkSubnet2",
    ip_cidr_range="10.0.2.0/24",
    region="us-west1",
    network=network.id)
router1 = gcp.compute.Router("router1",
    network=network.name,
    bgp=gcp.compute.RouterBgpArgs(
        asn=64514,
    ))
tunnel1 = gcp.compute.VPNTunnel("tunnel1",
    region="us-central1",
    vpn_gateway=ha_gateway.id,
    peer_external_gateway=external_gateway.id,
    peer_external_gateway_interface=0,
    shared_secret="a secret message",
    router=router1.id,
    vpn_gateway_interface=0)
tunnel2 = gcp.compute.VPNTunnel("tunnel2",
    region="us-central1",
    vpn_gateway=ha_gateway.id,
    peer_external_gateway=external_gateway.id,
    peer_external_gateway_interface=0,
    shared_secret="a secret message",
    router=router1.id.apply(lambda id: f" {id}"),
    vpn_gateway_interface=1)
router1_interface1 = gcp.compute.RouterInterface("router1Interface1",
    router=router1.name,
    region="us-central1",
    ip_range="169.254.0.1/30",
    vpn_tunnel=tunnel1.name)
router1_peer1 = gcp.compute.RouterPeer("router1Peer1",
    router=router1.name,
    region="us-central1",
    peer_ip_address="169.254.0.2",
    peer_asn=64515,
    advertised_route_priority=100,
    interface=router1_interface1.name)
router1_interface2 = gcp.compute.RouterInterface("router1Interface2",
    router=router1.name,
    region="us-central1",
    ip_range="169.254.1.1/30",
    vpn_tunnel=tunnel2.name)
router1_peer2 = gcp.compute.RouterPeer("router1Peer2",
    router=router1.name,
    region="us-central1",
    peer_ip_address="169.254.1.2",
    peer_asn=64515,
    advertised_route_priority=100,
    interface=router1_interface2.name)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const network = new gcp.compute.Network("network", {
    routingMode: "GLOBAL",
    autoCreateSubnetworks: false,
});
const haGateway = new gcp.compute.HaVpnGateway("haGateway", {
    region: "us-central1",
    network: network.id,
});
const externalGateway = new gcp.compute.ExternalVpnGateway("externalGateway", {
    redundancyType: "SINGLE_IP_INTERNALLY_REDUNDANT",
    description: "An externally managed VPN gateway",
    interfaces: [{
        id: 0,
        ipAddress: "8.8.8.8",
    }],
});
const networkSubnet1 = new gcp.compute.Subnetwork("networkSubnet1", {
    ipCidrRange: "10.0.1.0/24",
    region: "us-central1",
    network: network.id,
});
const networkSubnet2 = new gcp.compute.Subnetwork("networkSubnet2", {
    ipCidrRange: "10.0.2.0/24",
    region: "us-west1",
    network: network.id,
});
const router1 = new gcp.compute.Router("router1", {
    network: network.name,
    bgp: {
        asn: 64514,
    },
});
const tunnel1 = new gcp.compute.VPNTunnel("tunnel1", {
    region: "us-central1",
    vpnGateway: haGateway.id,
    peerExternalGateway: externalGateway.id,
    peerExternalGatewayInterface: 0,
    sharedSecret: "a secret message",
    router: router1.id,
    vpnGatewayInterface: 0,
});
const tunnel2 = new gcp.compute.VPNTunnel("tunnel2", {
    region: "us-central1",
    vpnGateway: haGateway.id,
    peerExternalGateway: externalGateway.id,
    peerExternalGatewayInterface: 0,
    sharedSecret: "a secret message",
    router: pulumi.interpolate` ${router1.id}`,
    vpnGatewayInterface: 1,
});
const router1Interface1 = new gcp.compute.RouterInterface("router1Interface1", {
    router: router1.name,
    region: "us-central1",
    ipRange: "169.254.0.1/30",
    vpnTunnel: tunnel1.name,
});
const router1Peer1 = new gcp.compute.RouterPeer("router1Peer1", {
    router: router1.name,
    region: "us-central1",
    peerIpAddress: "169.254.0.2",
    peerAsn: 64515,
    advertisedRoutePriority: 100,
    "interface": router1Interface1.name,
});
const router1Interface2 = new gcp.compute.RouterInterface("router1Interface2", {
    router: router1.name,
    region: "us-central1",
    ipRange: "169.254.1.1/30",
    vpnTunnel: tunnel2.name,
});
const router1Peer2 = new gcp.compute.RouterPeer("router1Peer2", {
    router: router1.name,
    region: "us-central1",
    peerIpAddress: "169.254.1.2",
    peerAsn: 64515,
    advertisedRoutePriority: 100,
    "interface": router1Interface2.name,
});
resources:
  haGateway:
    type: gcp:compute:HaVpnGateway
    properties:
      region: us-central1
      network: ${network.id}
  externalGateway:
    type: gcp:compute:ExternalVpnGateway
    properties:
      redundancyType: SINGLE_IP_INTERNALLY_REDUNDANT
      description: An externally managed VPN gateway
      interfaces:
        - id: 0
          ipAddress: 8.8.8.8
  network:
    type: gcp:compute:Network
    properties:
      routingMode: GLOBAL
      autoCreateSubnetworks: false
  networkSubnet1:
    type: gcp:compute:Subnetwork
    properties:
      ipCidrRange: 10.0.1.0/24
      region: us-central1
      network: ${network.id}
  networkSubnet2:
    type: gcp:compute:Subnetwork
    properties:
      ipCidrRange: 10.0.2.0/24
      region: us-west1
      network: ${network.id}
  router1:
    type: gcp:compute:Router
    properties:
      network: ${network.name}
      bgp:
        asn: 64514
  tunnel1:
    type: gcp:compute:VPNTunnel
    properties:
      region: us-central1
      vpnGateway: ${haGateway.id}
      peerExternalGateway: ${externalGateway.id}
      peerExternalGatewayInterface: 0
      sharedSecret: a secret message
      router: ${router1.id}
      vpnGatewayInterface: 0
  tunnel2:
    type: gcp:compute:VPNTunnel
    properties:
      region: us-central1
      vpnGateway: ${haGateway.id}
      peerExternalGateway: ${externalGateway.id}
      peerExternalGatewayInterface: 0
      sharedSecret: a secret message
      router: ' ${router1.id}'
      vpnGatewayInterface: 1
  router1Interface1:
    type: gcp:compute:RouterInterface
    properties:
      router: ${router1.name}
      region: us-central1
      ipRange: 169.254.0.1/30
      vpnTunnel: ${tunnel1.name}
  router1Peer1:
    type: gcp:compute:RouterPeer
    properties:
      router: ${router1.name}
      region: us-central1
      peerIpAddress: 169.254.0.2
      peerAsn: 64515
      advertisedRoutePriority: 100
      interface: ${router1Interface1.name}
  router1Interface2:
    type: gcp:compute:RouterInterface
    properties:
      router: ${router1.name}
      region: us-central1
      ipRange: 169.254.1.1/30
      vpnTunnel: ${tunnel2.name}
  router1Peer2:
    type: gcp:compute:RouterPeer
    properties:
      router: ${router1.name}
      region: us-central1
      peerIpAddress: 169.254.1.2
      peerAsn: 64515
      advertisedRoutePriority: 100
      interface: ${router1Interface2.name}

Create a ExternalVpnGateway Resource

new ExternalVpnGateway(name: string, args?: ExternalVpnGatewayArgs, opts?: CustomResourceOptions);
@overload
def ExternalVpnGateway(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       interfaces: Optional[Sequence[ExternalVpnGatewayInterfaceArgs]] = None,
                       name: Optional[str] = None,
                       project: Optional[str] = None,
                       redundancy_type: Optional[str] = None)
@overload
def ExternalVpnGateway(resource_name: str,
                       args: Optional[ExternalVpnGatewayArgs] = None,
                       opts: Optional[ResourceOptions] = None)
func NewExternalVpnGateway(ctx *Context, name string, args *ExternalVpnGatewayArgs, opts ...ResourceOption) (*ExternalVpnGateway, error)
public ExternalVpnGateway(string name, ExternalVpnGatewayArgs? args = null, CustomResourceOptions? opts = null)
public ExternalVpnGateway(String name, ExternalVpnGatewayArgs args)
public ExternalVpnGateway(String name, ExternalVpnGatewayArgs args, CustomResourceOptions options)
type: gcp:compute:ExternalVpnGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ExternalVpnGatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ExternalVpnGatewayArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ExternalVpnGatewayArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ExternalVpnGatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ExternalVpnGatewayArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ExternalVpnGateway Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ExternalVpnGateway resource accepts the following input properties:

Description string

An optional description of this resource.

Interfaces List<ExternalVpnGatewayInterfaceArgs>

A list of interfaces on this external VPN gateway. Structure is documented below.

Name string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

RedundancyType string

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

Description string

An optional description of this resource.

Interfaces []ExternalVpnGatewayInterfaceArgs

A list of interfaces on this external VPN gateway. Structure is documented below.

Name string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

RedundancyType string

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

description String

An optional description of this resource.

interfaces ListVpnGatewayInterfaceArgs>

A list of interfaces on this external VPN gateway. Structure is documented below.

name String

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancyType String

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

description string

An optional description of this resource.

interfaces ExternalVpnGatewayInterfaceArgs[]

A list of interfaces on this external VPN gateway. Structure is documented below.

name string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancyType string

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

description str

An optional description of this resource.

interfaces Sequence[ExternalVpnGatewayInterfaceArgs]

A list of interfaces on this external VPN gateway. Structure is documented below.

name str

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancy_type str

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

description String

An optional description of this resource.

interfaces List

A list of interfaces on this external VPN gateway. Structure is documented below.

name String

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancyType String

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

Outputs

All input properties are implicitly available as output properties. Additionally, the ExternalVpnGateway resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

SelfLink string

The URI of the created resource.

Id string

The provider-assigned unique ID for this managed resource.

SelfLink string

The URI of the created resource.

id String

The provider-assigned unique ID for this managed resource.

selfLink String

The URI of the created resource.

id string

The provider-assigned unique ID for this managed resource.

selfLink string

The URI of the created resource.

id str

The provider-assigned unique ID for this managed resource.

self_link str

The URI of the created resource.

id String

The provider-assigned unique ID for this managed resource.

selfLink String

The URI of the created resource.

Look up an Existing ExternalVpnGateway Resource

Get an existing ExternalVpnGateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ExternalVpnGatewayState, opts?: CustomResourceOptions): ExternalVpnGateway
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        interfaces: Optional[Sequence[ExternalVpnGatewayInterfaceArgs]] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        redundancy_type: Optional[str] = None,
        self_link: Optional[str] = None) -> ExternalVpnGateway
func GetExternalVpnGateway(ctx *Context, name string, id IDInput, state *ExternalVpnGatewayState, opts ...ResourceOption) (*ExternalVpnGateway, error)
public static ExternalVpnGateway Get(string name, Input<string> id, ExternalVpnGatewayState? state, CustomResourceOptions? opts = null)
public static ExternalVpnGateway get(String name, Output<String> id, ExternalVpnGatewayState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string

An optional description of this resource.

Interfaces List<ExternalVpnGatewayInterfaceArgs>

A list of interfaces on this external VPN gateway. Structure is documented below.

Name string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

RedundancyType string

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

SelfLink string

The URI of the created resource.

Description string

An optional description of this resource.

Interfaces []ExternalVpnGatewayInterfaceArgs

A list of interfaces on this external VPN gateway. Structure is documented below.

Name string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

RedundancyType string

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

SelfLink string

The URI of the created resource.

description String

An optional description of this resource.

interfaces ListVpnGatewayInterfaceArgs>

A list of interfaces on this external VPN gateway. Structure is documented below.

name String

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancyType String

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

selfLink String

The URI of the created resource.

description string

An optional description of this resource.

interfaces ExternalVpnGatewayInterfaceArgs[]

A list of interfaces on this external VPN gateway. Structure is documented below.

name string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancyType string

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

selfLink string

The URI of the created resource.

description str

An optional description of this resource.

interfaces Sequence[ExternalVpnGatewayInterfaceArgs]

A list of interfaces on this external VPN gateway. Structure is documented below.

name str

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancy_type str

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

self_link str

The URI of the created resource.

description String

An optional description of this resource.

interfaces List

A list of interfaces on this external VPN gateway. Structure is documented below.

name String

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

redundancyType String

Indicates the redundancy type of this external VPN gateway Possible values are FOUR_IPS_REDUNDANCY, SINGLE_IP_INTERNALLY_REDUNDANT, and TWO_IPS_REDUNDANCY.

selfLink String

The URI of the created resource.

Supporting Types

ExternalVpnGatewayInterface

Id int

The numeric ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway

  • 0 - SINGLE_IP_INTERNALLY_REDUNDANT
  • 0, 1 - TWO_IPS_REDUNDANCY
  • 0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
IpAddress string

IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine.

Id int

The numeric ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway

  • 0 - SINGLE_IP_INTERNALLY_REDUNDANT
  • 0, 1 - TWO_IPS_REDUNDANCY
  • 0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
IpAddress string

IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine.

id Integer

The numeric ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway

  • 0 - SINGLE_IP_INTERNALLY_REDUNDANT
  • 0, 1 - TWO_IPS_REDUNDANCY
  • 0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ipAddress String

IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine.

id number

The numeric ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway

  • 0 - SINGLE_IP_INTERNALLY_REDUNDANT
  • 0, 1 - TWO_IPS_REDUNDANCY
  • 0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ipAddress string

IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine.

id int

The numeric ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway

  • 0 - SINGLE_IP_INTERNALLY_REDUNDANT
  • 0, 1 - TWO_IPS_REDUNDANCY
  • 0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ip_address str

IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine.

id Number

The numeric ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway

  • 0 - SINGLE_IP_INTERNALLY_REDUNDANT
  • 0, 1 - TWO_IPS_REDUNDANCY
  • 0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ipAddress String

IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine.

Import

ExternalVpnGateway can be imported using any of these accepted formats

 $ pulumi import gcp:compute/externalVpnGateway:ExternalVpnGateway default projects/{{project}}/global/externalVpnGateways/{{name}}
 $ pulumi import gcp:compute/externalVpnGateway:ExternalVpnGateway default {{project}}/{{name}}
 $ pulumi import gcp:compute/externalVpnGateway:ExternalVpnGateway default {{name}}

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.