1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. VPNGateway
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.compute.VPNGateway

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you.

    To get more information about VpnGateway, see:

    Warning: Classic VPN is deprecating certain functionality on October 31, 2021. For more information, see the Classic VPN partial deprecation page.

    Example Usage

    Target Vpn Gateway Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network1 = new gcp.compute.Network("network1", {name: "network-1"});
    const targetGateway = new gcp.compute.VPNGateway("target_gateway", {
        name: "vpn-1",
        network: network1.id,
    });
    const vpnStaticIp = new gcp.compute.Address("vpn_static_ip", {name: "vpn-static-ip"});
    const frEsp = new gcp.compute.ForwardingRule("fr_esp", {
        name: "fr-esp",
        ipProtocol: "ESP",
        ipAddress: vpnStaticIp.address,
        target: targetGateway.id,
    });
    const frUdp500 = new gcp.compute.ForwardingRule("fr_udp500", {
        name: "fr-udp500",
        ipProtocol: "UDP",
        portRange: "500",
        ipAddress: vpnStaticIp.address,
        target: targetGateway.id,
    });
    const frUdp4500 = new gcp.compute.ForwardingRule("fr_udp4500", {
        name: "fr-udp4500",
        ipProtocol: "UDP",
        portRange: "4500",
        ipAddress: vpnStaticIp.address,
        target: targetGateway.id,
    });
    const tunnel1 = new gcp.compute.VPNTunnel("tunnel1", {
        name: "tunnel1",
        peerIp: "15.0.0.120",
        sharedSecret: "a secret message",
        targetVpnGateway: targetGateway.id,
    }, {
        dependsOn: [
            frEsp,
            frUdp500,
            frUdp4500,
        ],
    });
    const route1 = new gcp.compute.Route("route1", {
        name: "route1",
        network: network1.name,
        destRange: "15.0.0.0/24",
        priority: 1000,
        nextHopVpnTunnel: tunnel1.id,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network1 = gcp.compute.Network("network1", name="network-1")
    target_gateway = gcp.compute.VPNGateway("target_gateway",
        name="vpn-1",
        network=network1.id)
    vpn_static_ip = gcp.compute.Address("vpn_static_ip", name="vpn-static-ip")
    fr_esp = gcp.compute.ForwardingRule("fr_esp",
        name="fr-esp",
        ip_protocol="ESP",
        ip_address=vpn_static_ip.address,
        target=target_gateway.id)
    fr_udp500 = gcp.compute.ForwardingRule("fr_udp500",
        name="fr-udp500",
        ip_protocol="UDP",
        port_range="500",
        ip_address=vpn_static_ip.address,
        target=target_gateway.id)
    fr_udp4500 = gcp.compute.ForwardingRule("fr_udp4500",
        name="fr-udp4500",
        ip_protocol="UDP",
        port_range="4500",
        ip_address=vpn_static_ip.address,
        target=target_gateway.id)
    tunnel1 = gcp.compute.VPNTunnel("tunnel1",
        name="tunnel1",
        peer_ip="15.0.0.120",
        shared_secret="a secret message",
        target_vpn_gateway=target_gateway.id,
        opts = pulumi.ResourceOptions(depends_on=[
                fr_esp,
                fr_udp500,
                fr_udp4500,
            ]))
    route1 = gcp.compute.Route("route1",
        name="route1",
        network=network1.name,
        dest_range="15.0.0.0/24",
        priority=1000,
        next_hop_vpn_tunnel=tunnel1.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := compute.NewNetwork(ctx, "network1", &compute.NetworkArgs{
    			Name: pulumi.String("network-1"),
    		})
    		if err != nil {
    			return err
    		}
    		targetGateway, err := compute.NewVPNGateway(ctx, "target_gateway", &compute.VPNGatewayArgs{
    			Name:    pulumi.String("vpn-1"),
    			Network: network1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		vpnStaticIp, err := compute.NewAddress(ctx, "vpn_static_ip", &compute.AddressArgs{
    			Name: pulumi.String("vpn-static-ip"),
    		})
    		if err != nil {
    			return err
    		}
    		frEsp, err := compute.NewForwardingRule(ctx, "fr_esp", &compute.ForwardingRuleArgs{
    			Name:       pulumi.String("fr-esp"),
    			IpProtocol: pulumi.String("ESP"),
    			IpAddress:  vpnStaticIp.Address,
    			Target:     targetGateway.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		frUdp500, err := compute.NewForwardingRule(ctx, "fr_udp500", &compute.ForwardingRuleArgs{
    			Name:       pulumi.String("fr-udp500"),
    			IpProtocol: pulumi.String("UDP"),
    			PortRange:  pulumi.String("500"),
    			IpAddress:  vpnStaticIp.Address,
    			Target:     targetGateway.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		frUdp4500, err := compute.NewForwardingRule(ctx, "fr_udp4500", &compute.ForwardingRuleArgs{
    			Name:       pulumi.String("fr-udp4500"),
    			IpProtocol: pulumi.String("UDP"),
    			PortRange:  pulumi.String("4500"),
    			IpAddress:  vpnStaticIp.Address,
    			Target:     targetGateway.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		tunnel1, err := compute.NewVPNTunnel(ctx, "tunnel1", &compute.VPNTunnelArgs{
    			Name:             pulumi.String("tunnel1"),
    			PeerIp:           pulumi.String("15.0.0.120"),
    			SharedSecret:     pulumi.String("a secret message"),
    			TargetVpnGateway: targetGateway.ID(),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			frEsp,
    			frUdp500,
    			frUdp4500,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewRoute(ctx, "route1", &compute.RouteArgs{
    			Name:             pulumi.String("route1"),
    			Network:          network1.Name,
    			DestRange:        pulumi.String("15.0.0.0/24"),
    			Priority:         pulumi.Int(1000),
    			NextHopVpnTunnel: tunnel1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new Gcp.Compute.Network("network1", new()
        {
            Name = "network-1",
        });
    
        var targetGateway = new Gcp.Compute.VPNGateway("target_gateway", new()
        {
            Name = "vpn-1",
            Network = network1.Id,
        });
    
        var vpnStaticIp = new Gcp.Compute.Address("vpn_static_ip", new()
        {
            Name = "vpn-static-ip",
        });
    
        var frEsp = new Gcp.Compute.ForwardingRule("fr_esp", new()
        {
            Name = "fr-esp",
            IpProtocol = "ESP",
            IpAddress = vpnStaticIp.IPAddress,
            Target = targetGateway.Id,
        });
    
        var frUdp500 = new Gcp.Compute.ForwardingRule("fr_udp500", new()
        {
            Name = "fr-udp500",
            IpProtocol = "UDP",
            PortRange = "500",
            IpAddress = vpnStaticIp.IPAddress,
            Target = targetGateway.Id,
        });
    
        var frUdp4500 = new Gcp.Compute.ForwardingRule("fr_udp4500", new()
        {
            Name = "fr-udp4500",
            IpProtocol = "UDP",
            PortRange = "4500",
            IpAddress = vpnStaticIp.IPAddress,
            Target = targetGateway.Id,
        });
    
        var tunnel1 = new Gcp.Compute.VPNTunnel("tunnel1", new()
        {
            Name = "tunnel1",
            PeerIp = "15.0.0.120",
            SharedSecret = "a secret message",
            TargetVpnGateway = targetGateway.Id,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                frEsp,
                frUdp500,
                frUdp4500,
            },
        });
    
        var route1 = new Gcp.Compute.Route("route1", new()
        {
            Name = "route1",
            Network = network1.Name,
            DestRange = "15.0.0.0/24",
            Priority = 1000,
            NextHopVpnTunnel = tunnel1.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.VPNGateway;
    import com.pulumi.gcp.compute.VPNGatewayArgs;
    import com.pulumi.gcp.compute.Address;
    import com.pulumi.gcp.compute.AddressArgs;
    import com.pulumi.gcp.compute.ForwardingRule;
    import com.pulumi.gcp.compute.ForwardingRuleArgs;
    import com.pulumi.gcp.compute.VPNTunnel;
    import com.pulumi.gcp.compute.VPNTunnelArgs;
    import com.pulumi.gcp.compute.Route;
    import com.pulumi.gcp.compute.RouteArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var network1 = new Network("network1", NetworkArgs.builder()
                .name("network-1")
                .build());
    
            var targetGateway = new VPNGateway("targetGateway", VPNGatewayArgs.builder()
                .name("vpn-1")
                .network(network1.id())
                .build());
    
            var vpnStaticIp = new Address("vpnStaticIp", AddressArgs.builder()
                .name("vpn-static-ip")
                .build());
    
            var frEsp = new ForwardingRule("frEsp", ForwardingRuleArgs.builder()
                .name("fr-esp")
                .ipProtocol("ESP")
                .ipAddress(vpnStaticIp.address())
                .target(targetGateway.id())
                .build());
    
            var frUdp500 = new ForwardingRule("frUdp500", ForwardingRuleArgs.builder()
                .name("fr-udp500")
                .ipProtocol("UDP")
                .portRange("500")
                .ipAddress(vpnStaticIp.address())
                .target(targetGateway.id())
                .build());
    
            var frUdp4500 = new ForwardingRule("frUdp4500", ForwardingRuleArgs.builder()
                .name("fr-udp4500")
                .ipProtocol("UDP")
                .portRange("4500")
                .ipAddress(vpnStaticIp.address())
                .target(targetGateway.id())
                .build());
    
            var tunnel1 = new VPNTunnel("tunnel1", VPNTunnelArgs.builder()
                .name("tunnel1")
                .peerIp("15.0.0.120")
                .sharedSecret("a secret message")
                .targetVpnGateway(targetGateway.id())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        frEsp,
                        frUdp500,
                        frUdp4500)
                    .build());
    
            var route1 = new Route("route1", RouteArgs.builder()
                .name("route1")
                .network(network1.name())
                .destRange("15.0.0.0/24")
                .priority(1000)
                .nextHopVpnTunnel(tunnel1.id())
                .build());
    
        }
    }
    
    resources:
      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}
      tunnel1:
        type: gcp:compute:VPNTunnel
        properties:
          name: tunnel1
          peerIp: 15.0.0.120
          sharedSecret: a secret message
          targetVpnGateway: ${targetGateway.id}
        options:
          dependson:
            - ${frEsp}
            - ${frUdp500}
            - ${frUdp4500}
      route1:
        type: gcp:compute:Route
        properties:
          name: route1
          network: ${network1.name}
          destRange: 15.0.0.0/24
          priority: 1000
          nextHopVpnTunnel: ${tunnel1.id}
    

    Create VPNGateway Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args VPNGatewayArgs
    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 VPNGatewayArgs
    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 VPNGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VPNGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VPNGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpngatewayResource = new Gcp.Compute.VPNGateway("vpngatewayResource", new()
    {
        Network = "string",
        Description = "string",
        Name = "string",
        Project = "string",
        Region = "string",
    });
    
    example, err := compute.NewVPNGateway(ctx, "vpngatewayResource", &compute.VPNGatewayArgs{
    	Network:     pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	Region:      pulumi.String("string"),
    })
    
    var vpngatewayResource = new VPNGateway("vpngatewayResource", VPNGatewayArgs.builder()
        .network("string")
        .description("string")
        .name("string")
        .project("string")
        .region("string")
        .build());
    
    vpngateway_resource = gcp.compute.VPNGateway("vpngatewayResource",
        network="string",
        description="string",
        name="string",
        project="string",
        region="string")
    
    const vpngatewayResource = new gcp.compute.VPNGateway("vpngatewayResource", {
        network: "string",
        description: "string",
        name: "string",
        project: "string",
        region: "string",
    });
    
    type: gcp:compute:VPNGateway
    properties:
        description: string
        name: string
        network: string
        project: string
        region: string
    

    VPNGateway 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 VPNGateway resource accepts the following input properties:

    Network string
    The network this VPN gateway is accepting traffic for.


    Description string
    An optional description of this resource.
    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.
    Region string
    The region this gateway should sit in.
    Network string
    The network this VPN gateway is accepting traffic for.


    Description string
    An optional description of this resource.
    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.
    Region string
    The region this gateway should sit in.
    network String
    The network this VPN gateway is accepting traffic for.


    description String
    An optional description of this resource.
    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.
    region String
    The region this gateway should sit in.
    network string
    The network this VPN gateway is accepting traffic for.


    description string
    An optional description of this resource.
    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.
    region string
    The region this gateway should sit in.
    network str
    The network this VPN gateway is accepting traffic for.


    description str
    An optional description of this resource.
    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.
    region str
    The region this gateway should sit in.
    network String
    The network this VPN gateway is accepting traffic for.


    description String
    An optional description of this resource.
    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.
    region String
    The region this gateway should sit in.

    Outputs

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

    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    GatewayId int
    The unique identifier for the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    GatewayId int
    The unique identifier for the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    gatewayId Integer
    The unique identifier for the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    gatewayId number
    The unique identifier for the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    gateway_id int
    The unique identifier for the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    gatewayId Number
    The unique identifier for the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.

    Look up Existing VPNGateway Resource

    Get an existing VPNGateway 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?: VPNGatewayState, opts?: CustomResourceOptions): VPNGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            creation_timestamp: Optional[str] = None,
            description: Optional[str] = None,
            gateway_id: Optional[int] = None,
            name: Optional[str] = None,
            network: Optional[str] = None,
            project: Optional[str] = None,
            region: Optional[str] = None,
            self_link: Optional[str] = None) -> VPNGateway
    func GetVPNGateway(ctx *Context, name string, id IDInput, state *VPNGatewayState, opts ...ResourceOption) (*VPNGateway, error)
    public static VPNGateway Get(string name, Input<string> id, VPNGatewayState? state, CustomResourceOptions? opts = null)
    public static VPNGateway get(String name, Output<String> id, VPNGatewayState 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:
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource.
    GatewayId int
    The unique identifier for the resource.
    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.
    Network string
    The network this VPN gateway is accepting traffic for.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The region this gateway should sit in.
    SelfLink string
    The URI of the created resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource.
    GatewayId int
    The unique identifier for the resource.
    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.
    Network string
    The network this VPN gateway is accepting traffic for.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The region this gateway should sit in.
    SelfLink string
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource.
    gatewayId Integer
    The unique identifier for the resource.
    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.
    network String
    The network this VPN gateway is accepting traffic for.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The region this gateway should sit in.
    selfLink String
    The URI of the created resource.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    description string
    An optional description of this resource.
    gatewayId number
    The unique identifier for the resource.
    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.
    network string
    The network this VPN gateway is accepting traffic for.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    The region this gateway should sit in.
    selfLink string
    The URI of the created resource.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    description str
    An optional description of this resource.
    gateway_id int
    The unique identifier for the resource.
    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.
    network str
    The network this VPN gateway is accepting traffic for.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    The region this gateway should sit in.
    self_link str
    The URI of the created resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource.
    gatewayId Number
    The unique identifier for the resource.
    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.
    network String
    The network this VPN gateway is accepting traffic for.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The region this gateway should sit in.
    selfLink String
    The URI of the created resource.

    Import

    VpnGateway can be imported using any of these accepted formats:

    • projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}

    • {{project}}/{{region}}/{{name}}

    • {{region}}/{{name}}

    • {{name}}

    When using the pulumi import command, VpnGateway can be imported using one of the formats above. For example:

    $ pulumi import gcp:compute/vPNGateway:VPNGateway default projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}
    
    $ pulumi import gcp:compute/vPNGateway:VPNGateway default {{project}}/{{region}}/{{name}}
    
    $ pulumi import gcp:compute/vPNGateway:VPNGateway default {{region}}/{{name}}
    
    $ pulumi import gcp:compute/vPNGateway:VPNGateway default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi