gcp.compute.HaVpnGateway
Explore with Pulumi AI
Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you. This type of VPN Gateway allows for the creation of VPN solutions with higher availability than classic Target VPN Gateways.
To get more information about HaVpnGateway, see:
- API documentation
- How-to Guides
Example Usage
Ha Vpn Gateway Basic
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()
{
AutoCreateSubnetworks = false,
});
var haGateway1 = new Gcp.Compute.HaVpnGateway("haGateway1", new()
{
Region = "us-central1",
Network = network1.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{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewHaVpnGateway(ctx, "haGateway1", &compute.HaVpnGatewayArgs{
Region: pulumi.String("us-central1"),
Network: network1.ID(),
})
if err != nil {
return err
}
return nil
})
}
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.HaVpnGateway;
import com.pulumi.gcp.compute.HaVpnGatewayArgs;
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()
.autoCreateSubnetworks(false)
.build());
var haGateway1 = new HaVpnGateway("haGateway1", HaVpnGatewayArgs.builder()
.region("us-central1")
.network(network1.id())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
network1 = gcp.compute.Network("network1", auto_create_subnetworks=False)
ha_gateway1 = gcp.compute.HaVpnGateway("haGateway1",
region="us-central1",
network=network1.id)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const network1 = new gcp.compute.Network("network1", {autoCreateSubnetworks: false});
const haGateway1 = new gcp.compute.HaVpnGateway("haGateway1", {
region: "us-central1",
network: network1.id,
});
resources:
haGateway1:
type: gcp:compute:HaVpnGateway
properties:
region: us-central1
network: ${network1.id}
network1:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
Ha Vpn Gateway Ipv6
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()
{
AutoCreateSubnetworks = false,
});
var haGateway1 = new Gcp.Compute.HaVpnGateway("haGateway1", new()
{
Region = "us-central1",
Network = network1.Id,
StackType = "IPV4_IPV6",
});
});
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{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewHaVpnGateway(ctx, "haGateway1", &compute.HaVpnGatewayArgs{
Region: pulumi.String("us-central1"),
Network: network1.ID(),
StackType: pulumi.String("IPV4_IPV6"),
})
if err != nil {
return err
}
return nil
})
}
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.HaVpnGateway;
import com.pulumi.gcp.compute.HaVpnGatewayArgs;
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()
.autoCreateSubnetworks(false)
.build());
var haGateway1 = new HaVpnGateway("haGateway1", HaVpnGatewayArgs.builder()
.region("us-central1")
.network(network1.id())
.stackType("IPV4_IPV6")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
network1 = gcp.compute.Network("network1", auto_create_subnetworks=False)
ha_gateway1 = gcp.compute.HaVpnGateway("haGateway1",
region="us-central1",
network=network1.id,
stack_type="IPV4_IPV6")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const network1 = new gcp.compute.Network("network1", {autoCreateSubnetworks: false});
const haGateway1 = new gcp.compute.HaVpnGateway("haGateway1", {
region: "us-central1",
network: network1.id,
stackType: "IPV4_IPV6",
});
resources:
haGateway1:
type: gcp:compute:HaVpnGateway
properties:
region: us-central1
network: ${network1.id}
stackType: IPV4_IPV6
network1:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
Compute Ha Vpn Gateway Encrypted Interconnect
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var network = new Gcp.Compute.Network("network", new()
{
AutoCreateSubnetworks = false,
});
var address1 = new Gcp.Compute.Address("address1", new()
{
AddressType = "INTERNAL",
Purpose = "IPSEC_INTERCONNECT",
IPAddress = "192.168.1.0",
PrefixLength = 29,
Network = network.SelfLink,
});
var router = new Gcp.Compute.Router("router", new()
{
Network = network.Name,
EncryptedInterconnectRouter = true,
Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
{
Asn = 16550,
},
});
var attachment1 = new Gcp.Compute.InterconnectAttachment("attachment1", new()
{
EdgeAvailabilityDomain = "AVAILABILITY_DOMAIN_1",
Type = "PARTNER",
Router = router.Id,
Encryption = "IPSEC",
IpsecInternalAddresses = new[]
{
address1.SelfLink,
},
});
var address2 = new Gcp.Compute.Address("address2", new()
{
AddressType = "INTERNAL",
Purpose = "IPSEC_INTERCONNECT",
IPAddress = "192.168.2.0",
PrefixLength = 29,
Network = network.SelfLink,
});
var attachment2 = new Gcp.Compute.InterconnectAttachment("attachment2", new()
{
EdgeAvailabilityDomain = "AVAILABILITY_DOMAIN_2",
Type = "PARTNER",
Router = router.Id,
Encryption = "IPSEC",
IpsecInternalAddresses = new[]
{
address2.SelfLink,
},
});
var vpn_gateway = new Gcp.Compute.HaVpnGateway("vpn-gateway", new()
{
Network = network.Id,
VpnInterfaces = new[]
{
new Gcp.Compute.Inputs.HaVpnGatewayVpnInterfaceArgs
{
Id = 0,
InterconnectAttachment = attachment1.SelfLink,
},
new Gcp.Compute.Inputs.HaVpnGatewayVpnInterfaceArgs
{
Id = 1,
InterconnectAttachment = attachment2.SelfLink,
},
},
});
});
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 {
network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
address1, err := compute.NewAddress(ctx, "address1", &compute.AddressArgs{
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("IPSEC_INTERCONNECT"),
Address: pulumi.String("192.168.1.0"),
PrefixLength: pulumi.Int(29),
Network: network.SelfLink,
})
if err != nil {
return err
}
router, err := compute.NewRouter(ctx, "router", &compute.RouterArgs{
Network: network.Name,
EncryptedInterconnectRouter: pulumi.Bool(true),
Bgp: &compute.RouterBgpArgs{
Asn: pulumi.Int(16550),
},
})
if err != nil {
return err
}
attachment1, err := compute.NewInterconnectAttachment(ctx, "attachment1", &compute.InterconnectAttachmentArgs{
EdgeAvailabilityDomain: pulumi.String("AVAILABILITY_DOMAIN_1"),
Type: pulumi.String("PARTNER"),
Router: router.ID(),
Encryption: pulumi.String("IPSEC"),
IpsecInternalAddresses: pulumi.StringArray{
address1.SelfLink,
},
})
if err != nil {
return err
}
address2, err := compute.NewAddress(ctx, "address2", &compute.AddressArgs{
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("IPSEC_INTERCONNECT"),
Address: pulumi.String("192.168.2.0"),
PrefixLength: pulumi.Int(29),
Network: network.SelfLink,
})
if err != nil {
return err
}
attachment2, err := compute.NewInterconnectAttachment(ctx, "attachment2", &compute.InterconnectAttachmentArgs{
EdgeAvailabilityDomain: pulumi.String("AVAILABILITY_DOMAIN_2"),
Type: pulumi.String("PARTNER"),
Router: router.ID(),
Encryption: pulumi.String("IPSEC"),
IpsecInternalAddresses: pulumi.StringArray{
address2.SelfLink,
},
})
if err != nil {
return err
}
_, err = compute.NewHaVpnGateway(ctx, "vpn-gateway", &compute.HaVpnGatewayArgs{
Network: network.ID(),
VpnInterfaces: compute.HaVpnGatewayVpnInterfaceArray{
&compute.HaVpnGatewayVpnInterfaceArgs{
Id: pulumi.Int(0),
InterconnectAttachment: attachment1.SelfLink,
},
&compute.HaVpnGatewayVpnInterfaceArgs{
Id: pulumi.Int(1),
InterconnectAttachment: attachment2.SelfLink,
},
},
})
if err != nil {
return err
}
return nil
})
}
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.Address;
import com.pulumi.gcp.compute.AddressArgs;
import com.pulumi.gcp.compute.Router;
import com.pulumi.gcp.compute.RouterArgs;
import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
import com.pulumi.gcp.compute.InterconnectAttachment;
import com.pulumi.gcp.compute.InterconnectAttachmentArgs;
import com.pulumi.gcp.compute.HaVpnGateway;
import com.pulumi.gcp.compute.HaVpnGatewayArgs;
import com.pulumi.gcp.compute.inputs.HaVpnGatewayVpnInterfaceArgs;
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 network = new Network("network", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var address1 = new Address("address1", AddressArgs.builder()
.addressType("INTERNAL")
.purpose("IPSEC_INTERCONNECT")
.address("192.168.1.0")
.prefixLength(29)
.network(network.selfLink())
.build());
var router = new Router("router", RouterArgs.builder()
.network(network.name())
.encryptedInterconnectRouter(true)
.bgp(RouterBgpArgs.builder()
.asn(16550)
.build())
.build());
var attachment1 = new InterconnectAttachment("attachment1", InterconnectAttachmentArgs.builder()
.edgeAvailabilityDomain("AVAILABILITY_DOMAIN_1")
.type("PARTNER")
.router(router.id())
.encryption("IPSEC")
.ipsecInternalAddresses(address1.selfLink())
.build());
var address2 = new Address("address2", AddressArgs.builder()
.addressType("INTERNAL")
.purpose("IPSEC_INTERCONNECT")
.address("192.168.2.0")
.prefixLength(29)
.network(network.selfLink())
.build());
var attachment2 = new InterconnectAttachment("attachment2", InterconnectAttachmentArgs.builder()
.edgeAvailabilityDomain("AVAILABILITY_DOMAIN_2")
.type("PARTNER")
.router(router.id())
.encryption("IPSEC")
.ipsecInternalAddresses(address2.selfLink())
.build());
var vpn_gateway = new HaVpnGateway("vpn-gateway", HaVpnGatewayArgs.builder()
.network(network.id())
.vpnInterfaces(
HaVpnGatewayVpnInterfaceArgs.builder()
.id(0)
.interconnectAttachment(attachment1.selfLink())
.build(),
HaVpnGatewayVpnInterfaceArgs.builder()
.id(1)
.interconnectAttachment(attachment2.selfLink())
.build())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
network = gcp.compute.Network("network", auto_create_subnetworks=False)
address1 = gcp.compute.Address("address1",
address_type="INTERNAL",
purpose="IPSEC_INTERCONNECT",
address="192.168.1.0",
prefix_length=29,
network=network.self_link)
router = gcp.compute.Router("router",
network=network.name,
encrypted_interconnect_router=True,
bgp=gcp.compute.RouterBgpArgs(
asn=16550,
))
attachment1 = gcp.compute.InterconnectAttachment("attachment1",
edge_availability_domain="AVAILABILITY_DOMAIN_1",
type="PARTNER",
router=router.id,
encryption="IPSEC",
ipsec_internal_addresses=[address1.self_link])
address2 = gcp.compute.Address("address2",
address_type="INTERNAL",
purpose="IPSEC_INTERCONNECT",
address="192.168.2.0",
prefix_length=29,
network=network.self_link)
attachment2 = gcp.compute.InterconnectAttachment("attachment2",
edge_availability_domain="AVAILABILITY_DOMAIN_2",
type="PARTNER",
router=router.id,
encryption="IPSEC",
ipsec_internal_addresses=[address2.self_link])
vpn_gateway = gcp.compute.HaVpnGateway("vpn-gateway",
network=network.id,
vpn_interfaces=[
gcp.compute.HaVpnGatewayVpnInterfaceArgs(
id=0,
interconnect_attachment=attachment1.self_link,
),
gcp.compute.HaVpnGatewayVpnInterfaceArgs(
id=1,
interconnect_attachment=attachment2.self_link,
),
])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const network = new gcp.compute.Network("network", {autoCreateSubnetworks: false});
const address1 = new gcp.compute.Address("address1", {
addressType: "INTERNAL",
purpose: "IPSEC_INTERCONNECT",
address: "192.168.1.0",
prefixLength: 29,
network: network.selfLink,
});
const router = new gcp.compute.Router("router", {
network: network.name,
encryptedInterconnectRouter: true,
bgp: {
asn: 16550,
},
});
const attachment1 = new gcp.compute.InterconnectAttachment("attachment1", {
edgeAvailabilityDomain: "AVAILABILITY_DOMAIN_1",
type: "PARTNER",
router: router.id,
encryption: "IPSEC",
ipsecInternalAddresses: [address1.selfLink],
});
const address2 = new gcp.compute.Address("address2", {
addressType: "INTERNAL",
purpose: "IPSEC_INTERCONNECT",
address: "192.168.2.0",
prefixLength: 29,
network: network.selfLink,
});
const attachment2 = new gcp.compute.InterconnectAttachment("attachment2", {
edgeAvailabilityDomain: "AVAILABILITY_DOMAIN_2",
type: "PARTNER",
router: router.id,
encryption: "IPSEC",
ipsecInternalAddresses: [address2.selfLink],
});
const vpn_gateway = new gcp.compute.HaVpnGateway("vpn-gateway", {
network: network.id,
vpnInterfaces: [
{
id: 0,
interconnectAttachment: attachment1.selfLink,
},
{
id: 1,
interconnectAttachment: attachment2.selfLink,
},
],
});
resources:
vpn-gateway:
type: gcp:compute:HaVpnGateway
properties:
network: ${network.id}
vpnInterfaces:
- id: 0
interconnectAttachment: ${attachment1.selfLink}
- id: 1
interconnectAttachment: ${attachment2.selfLink}
attachment1:
type: gcp:compute:InterconnectAttachment
properties:
edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1
type: PARTNER
router: ${router.id}
encryption: IPSEC
ipsecInternalAddresses:
- ${address1.selfLink}
attachment2:
type: gcp:compute:InterconnectAttachment
properties:
edgeAvailabilityDomain: AVAILABILITY_DOMAIN_2
type: PARTNER
router: ${router.id}
encryption: IPSEC
ipsecInternalAddresses:
- ${address2.selfLink}
address1:
type: gcp:compute:Address
properties:
addressType: INTERNAL
purpose: IPSEC_INTERCONNECT
address: 192.168.1.0
prefixLength: 29
network: ${network.selfLink}
address2:
type: gcp:compute:Address
properties:
addressType: INTERNAL
purpose: IPSEC_INTERCONNECT
address: 192.168.2.0
prefixLength: 29
network: ${network.selfLink}
router:
type: gcp:compute:Router
properties:
network: ${network.name}
encryptedInterconnectRouter: true
bgp:
asn: 16550
network:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
Create HaVpnGateway Resource
new HaVpnGateway(name: string, args: HaVpnGatewayArgs, opts?: CustomResourceOptions);
@overload
def HaVpnGateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
network: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
stack_type: Optional[str] = None,
vpn_interfaces: Optional[Sequence[HaVpnGatewayVpnInterfaceArgs]] = None)
@overload
def HaVpnGateway(resource_name: str,
args: HaVpnGatewayArgs,
opts: Optional[ResourceOptions] = None)
func NewHaVpnGateway(ctx *Context, name string, args HaVpnGatewayArgs, opts ...ResourceOption) (*HaVpnGateway, error)
public HaVpnGateway(string name, HaVpnGatewayArgs args, CustomResourceOptions? opts = null)
public HaVpnGateway(String name, HaVpnGatewayArgs args)
public HaVpnGateway(String name, HaVpnGatewayArgs args, CustomResourceOptions options)
type: gcp:compute:HaVpnGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HaVpnGatewayArgs
- 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 HaVpnGatewayArgs
- 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 HaVpnGatewayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HaVpnGatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HaVpnGatewayArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
HaVpnGateway 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 HaVpnGateway 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.
- Stack
Type string The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- Vpn
Interfaces List<HaVpn Gateway Vpn Interface> A list of interfaces on this VPN gateway. Structure is documented below.
- 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.
- Stack
Type string The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- Vpn
Interfaces []HaVpn Gateway Vpn Interface Args A list of interfaces on this VPN gateway. Structure is documented below.
- 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.
- stack
Type String The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn
Interfaces List<HaVpn Gateway Vpn Interface> A list of interfaces on this VPN gateway. Structure is documented below.
- 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.
- stack
Type string The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn
Interfaces HaVpn Gateway Vpn Interface[] A list of interfaces on this VPN gateway. Structure is documented below.
- 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.
- stack_
type str The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn_
interfaces Sequence[HaVpn Gateway Vpn Interface Args] A list of interfaces on this VPN gateway. Structure is documented below.
- 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.
- stack
Type String The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn
Interfaces List<Property Map> A list of interfaces on this VPN gateway. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the HaVpnGateway resource produces the following output properties:
Look up Existing HaVpnGateway Resource
Get an existing HaVpnGateway 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?: HaVpnGatewayState, opts?: CustomResourceOptions): HaVpnGateway
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
network: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
self_link: Optional[str] = None,
stack_type: Optional[str] = None,
vpn_interfaces: Optional[Sequence[HaVpnGatewayVpnInterfaceArgs]] = None) -> HaVpnGateway
func GetHaVpnGateway(ctx *Context, name string, id IDInput, state *HaVpnGatewayState, opts ...ResourceOption) (*HaVpnGateway, error)
public static HaVpnGateway Get(string name, Input<string> id, HaVpnGatewayState? state, CustomResourceOptions? opts = null)
public static HaVpnGateway get(String name, Output<String> id, HaVpnGatewayState 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.
- 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.- 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.
- Self
Link string The URI of the created resource.
- Stack
Type string The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- Vpn
Interfaces List<HaVpn Gateway Vpn Interface> A list of interfaces on this VPN gateway. Structure is documented below.
- 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.- 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.
- Self
Link string The URI of the created resource.
- Stack
Type string The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- Vpn
Interfaces []HaVpn Gateway Vpn Interface Args A list of interfaces on this VPN gateway. Structure is documented below.
- 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.- 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.
- self
Link String The URI of the created resource.
- stack
Type String The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn
Interfaces List<HaVpn Gateway Vpn Interface> A list of interfaces on this VPN gateway. Structure is documented below.
- 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.- 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.
- self
Link string The URI of the created resource.
- stack
Type string The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn
Interfaces HaVpn Gateway Vpn Interface[] A list of interfaces on this VPN gateway. Structure is documented below.
- 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.- 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.
- stack_
type str The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn_
interfaces Sequence[HaVpn Gateway Vpn Interface Args] A list of interfaces on this VPN gateway. Structure is documented below.
- 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.- 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.
- self
Link String The URI of the created resource.
- stack
Type String The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used. Default value is
IPV4_ONLY
. Possible values are:IPV4_ONLY
,IPV4_IPV6
.- vpn
Interfaces List<Property Map> A list of interfaces on this VPN gateway. Structure is documented below.
Supporting Types
HaVpnGatewayVpnInterface, HaVpnGatewayVpnInterfaceArgs
- Id int
The numeric ID of this VPN gateway interface.
- Interconnect
Attachment string URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. Not currently available publicly.
- Ip
Address string (Output) The external IP address for this VPN gateway interface.
- Id int
The numeric ID of this VPN gateway interface.
- Interconnect
Attachment string URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. Not currently available publicly.
- Ip
Address string (Output) The external IP address for this VPN gateway interface.
- id Integer
The numeric ID of this VPN gateway interface.
- interconnect
Attachment String URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. Not currently available publicly.
- ip
Address String (Output) The external IP address for this VPN gateway interface.
- id number
The numeric ID of this VPN gateway interface.
- interconnect
Attachment string URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. Not currently available publicly.
- ip
Address string (Output) The external IP address for this VPN gateway interface.
- id int
The numeric ID of this VPN gateway interface.
- interconnect_
attachment str URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. Not currently available publicly.
- ip_
address str (Output) The external IP address for this VPN gateway interface.
- id Number
The numeric ID of this VPN gateway interface.
- interconnect
Attachment String URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. Not currently available publicly.
- ip
Address String (Output) The external IP address for this VPN gateway interface.
Import
HaVpnGateway can be imported using any of these accepted formats* projects/{{project}}/regions/{{region}}/vpnGateways/{{name}}
* {{project}}/{{region}}/{{name}}
* {{region}}/{{name}}
* {{name}}
In Terraform v1.5.0 and later, use an import
block to import HaVpnGateway using one of the formats above. For exampletf import {
id = “projects/{{project}}/regions/{{region}}/vpnGateways/{{name}}”
to = google_compute_ha_vpn_gateway.default }
$ pulumi import gcp:compute/haVpnGateway:HaVpnGateway When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), HaVpnGateway can be imported using one of the formats above. For example
$ pulumi import gcp:compute/haVpnGateway:HaVpnGateway default projects/{{project}}/regions/{{region}}/vpnGateways/{{name}}
$ pulumi import gcp:compute/haVpnGateway:HaVpnGateway default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/haVpnGateway:HaVpnGateway default {{region}}/{{name}}
$ pulumi import gcp:compute/haVpnGateway:HaVpnGateway default {{name}}
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.