We recommend new projects start with resources from the AWS provider.
aws-native.ec2.VpnConnection
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Specifies a VPN connection between a virtual private gateway and a VPN customer gateway or a transit gateway and a VPN customer gateway.
To specify a VPN connection between a transit gateway and customer gateway, use the TransitGatewayId
and CustomerGatewayId
properties.
To specify a VPN connection between a virtual private gateway and customer gateway, use the VpnGatewayId
and CustomerGatewayId
properties.
For more information, see in the User Guide.
Create VpnConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpnConnection(name: string, args: VpnConnectionArgs, opts?: CustomResourceOptions);
@overload
def VpnConnection(resource_name: str,
args: VpnConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpnConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
customer_gateway_id: Optional[str] = None,
type: Optional[str] = None,
remote_ipv6_network_cidr: Optional[str] = None,
local_ipv6_network_cidr: Optional[str] = None,
outside_ip_address_type: Optional[str] = None,
remote_ipv4_network_cidr: Optional[str] = None,
local_ipv4_network_cidr: Optional[str] = None,
static_routes_only: Optional[bool] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
transit_gateway_id: Optional[str] = None,
transport_transit_gateway_attachment_id: Optional[str] = None,
tunnel_inside_ip_version: Optional[str] = None,
enable_acceleration: Optional[bool] = None,
vpn_gateway_id: Optional[str] = None,
vpn_tunnel_options_specifications: Optional[Sequence[VpnConnectionVpnTunnelOptionsSpecificationArgs]] = None)
func NewVpnConnection(ctx *Context, name string, args VpnConnectionArgs, opts ...ResourceOption) (*VpnConnection, error)
public VpnConnection(string name, VpnConnectionArgs args, CustomResourceOptions? opts = null)
public VpnConnection(String name, VpnConnectionArgs args)
public VpnConnection(String name, VpnConnectionArgs args, CustomResourceOptions options)
type: aws-native:ec2:VpnConnection
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 VpnConnectionArgs
- 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 VpnConnectionArgs
- 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 VpnConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpnConnection 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 VpnConnection resource accepts the following input properties:
- Customer
Gateway stringId - The ID of the customer gateway at your end of the VPN connection.
- Type string
- The type of VPN connection.
- Enable
Acceleration bool - Indicate whether to enable acceleration for the VPN connection.
Default:
false
- Local
Ipv4Network stringCidr The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
0.0.0.0/0
- Local
Ipv6Network stringCidr The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
::/0
- Outside
Ip stringAddress Type The type of IPv4 address assigned to the outside interface of the customer gateway device.
Valid values:
PrivateIpv4
|PublicIpv4
Default:
PublicIpv4
- Remote
Ipv4Network stringCidr The IPv4 CIDR on the AWS side of the VPN connection.
Default:
0.0.0.0/0
- Remote
Ipv6Network stringCidr The IPv6 CIDR on the AWS side of the VPN connection.
Default:
::/0
- Static
Routes boolOnly - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. - List<Pulumi.
Aws Native. Inputs. Tag> - Any tags assigned to the VPN connection.
- Transit
Gateway stringId - The ID of the transit gateway associated with the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - Transport
Transit stringGateway Attachment Id The transit gateway attachment ID to use for the VPN tunnel.
Required if
OutsideIpAddressType
is set toPrivateIpv4
.- Tunnel
Inside stringIp Version Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
Default:
ipv4
- Vpn
Gateway stringId - The ID of the virtual private gateway at the AWS side of the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - Vpn
Tunnel List<Pulumi.Options Specifications Aws Native. Ec2. Inputs. Vpn Connection Vpn Tunnel Options Specification> - The tunnel options for the VPN connection.
- Customer
Gateway stringId - The ID of the customer gateway at your end of the VPN connection.
- Type string
- The type of VPN connection.
- Enable
Acceleration bool - Indicate whether to enable acceleration for the VPN connection.
Default:
false
- Local
Ipv4Network stringCidr The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
0.0.0.0/0
- Local
Ipv6Network stringCidr The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
::/0
- Outside
Ip stringAddress Type The type of IPv4 address assigned to the outside interface of the customer gateway device.
Valid values:
PrivateIpv4
|PublicIpv4
Default:
PublicIpv4
- Remote
Ipv4Network stringCidr The IPv4 CIDR on the AWS side of the VPN connection.
Default:
0.0.0.0/0
- Remote
Ipv6Network stringCidr The IPv6 CIDR on the AWS side of the VPN connection.
Default:
::/0
- Static
Routes boolOnly - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. - Tag
Args - Any tags assigned to the VPN connection.
- Transit
Gateway stringId - The ID of the transit gateway associated with the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - Transport
Transit stringGateway Attachment Id The transit gateway attachment ID to use for the VPN tunnel.
Required if
OutsideIpAddressType
is set toPrivateIpv4
.- Tunnel
Inside stringIp Version Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
Default:
ipv4
- Vpn
Gateway stringId - The ID of the virtual private gateway at the AWS side of the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - Vpn
Tunnel []VpnOptions Specifications Connection Vpn Tunnel Options Specification Args - The tunnel options for the VPN connection.
- customer
Gateway StringId - The ID of the customer gateway at your end of the VPN connection.
- type String
- The type of VPN connection.
- enable
Acceleration Boolean - Indicate whether to enable acceleration for the VPN connection.
Default:
false
- local
Ipv4Network StringCidr The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
0.0.0.0/0
- local
Ipv6Network StringCidr The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
::/0
- outside
Ip StringAddress Type The type of IPv4 address assigned to the outside interface of the customer gateway device.
Valid values:
PrivateIpv4
|PublicIpv4
Default:
PublicIpv4
- remote
Ipv4Network StringCidr The IPv4 CIDR on the AWS side of the VPN connection.
Default:
0.0.0.0/0
- remote
Ipv6Network StringCidr The IPv6 CIDR on the AWS side of the VPN connection.
Default:
::/0
- static
Routes BooleanOnly - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. - List<Tag>
- Any tags assigned to the VPN connection.
- transit
Gateway StringId - The ID of the transit gateway associated with the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - transport
Transit StringGateway Attachment Id The transit gateway attachment ID to use for the VPN tunnel.
Required if
OutsideIpAddressType
is set toPrivateIpv4
.- tunnel
Inside StringIp Version Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
Default:
ipv4
- vpn
Gateway StringId - The ID of the virtual private gateway at the AWS side of the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - vpn
Tunnel List<VpnOptions Specifications Connection Vpn Tunnel Options Specification> - The tunnel options for the VPN connection.
- customer
Gateway stringId - The ID of the customer gateway at your end of the VPN connection.
- type string
- The type of VPN connection.
- enable
Acceleration boolean - Indicate whether to enable acceleration for the VPN connection.
Default:
false
- local
Ipv4Network stringCidr The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
0.0.0.0/0
- local
Ipv6Network stringCidr The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
::/0
- outside
Ip stringAddress Type The type of IPv4 address assigned to the outside interface of the customer gateway device.
Valid values:
PrivateIpv4
|PublicIpv4
Default:
PublicIpv4
- remote
Ipv4Network stringCidr The IPv4 CIDR on the AWS side of the VPN connection.
Default:
0.0.0.0/0
- remote
Ipv6Network stringCidr The IPv6 CIDR on the AWS side of the VPN connection.
Default:
::/0
- static
Routes booleanOnly - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. - Tag[]
- Any tags assigned to the VPN connection.
- transit
Gateway stringId - The ID of the transit gateway associated with the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - transport
Transit stringGateway Attachment Id The transit gateway attachment ID to use for the VPN tunnel.
Required if
OutsideIpAddressType
is set toPrivateIpv4
.- tunnel
Inside stringIp Version Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
Default:
ipv4
- vpn
Gateway stringId - The ID of the virtual private gateway at the AWS side of the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - vpn
Tunnel VpnOptions Specifications Connection Vpn Tunnel Options Specification[] - The tunnel options for the VPN connection.
- customer_
gateway_ strid - The ID of the customer gateway at your end of the VPN connection.
- type str
- The type of VPN connection.
- enable_
acceleration bool - Indicate whether to enable acceleration for the VPN connection.
Default:
false
- local_
ipv4_ strnetwork_ cidr The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
0.0.0.0/0
- local_
ipv6_ strnetwork_ cidr The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
::/0
- outside_
ip_ straddress_ type The type of IPv4 address assigned to the outside interface of the customer gateway device.
Valid values:
PrivateIpv4
|PublicIpv4
Default:
PublicIpv4
- remote_
ipv4_ strnetwork_ cidr The IPv4 CIDR on the AWS side of the VPN connection.
Default:
0.0.0.0/0
- remote_
ipv6_ strnetwork_ cidr The IPv6 CIDR on the AWS side of the VPN connection.
Default:
::/0
- static_
routes_ boolonly - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. - Sequence[Tag
Args] - Any tags assigned to the VPN connection.
- transit_
gateway_ strid - The ID of the transit gateway associated with the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - transport_
transit_ strgateway_ attachment_ id The transit gateway attachment ID to use for the VPN tunnel.
Required if
OutsideIpAddressType
is set toPrivateIpv4
.- tunnel_
inside_ strip_ version Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
Default:
ipv4
- vpn_
gateway_ strid - The ID of the virtual private gateway at the AWS side of the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - vpn_
tunnel_ Sequence[Vpnoptions_ specifications Connection Vpn Tunnel Options Specification Args] - The tunnel options for the VPN connection.
- customer
Gateway StringId - The ID of the customer gateway at your end of the VPN connection.
- type String
- The type of VPN connection.
- enable
Acceleration Boolean - Indicate whether to enable acceleration for the VPN connection.
Default:
false
- local
Ipv4Network StringCidr The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
0.0.0.0/0
- local
Ipv6Network StringCidr The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
Default:
::/0
- outside
Ip StringAddress Type The type of IPv4 address assigned to the outside interface of the customer gateway device.
Valid values:
PrivateIpv4
|PublicIpv4
Default:
PublicIpv4
- remote
Ipv4Network StringCidr The IPv4 CIDR on the AWS side of the VPN connection.
Default:
0.0.0.0/0
- remote
Ipv6Network StringCidr The IPv6 CIDR on the AWS side of the VPN connection.
Default:
::/0
- static
Routes BooleanOnly - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify
true
. - List<Property Map>
- Any tags assigned to the VPN connection.
- transit
Gateway StringId - The ID of the transit gateway associated with the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - transport
Transit StringGateway Attachment Id The transit gateway attachment ID to use for the VPN tunnel.
Required if
OutsideIpAddressType
is set toPrivateIpv4
.- tunnel
Inside StringIp Version Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.
Default:
ipv4
- vpn
Gateway StringId - The ID of the virtual private gateway at the AWS side of the VPN connection.
You must specify either
TransitGatewayId
orVpnGatewayId
, but not both. - vpn
Tunnel List<Property Map>Options Specifications - The tunnel options for the VPN connection.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpnConnection resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Vpn
Connection stringId - The ID of the VPN connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Vpn
Connection stringId - The ID of the VPN connection.
- id String
- The provider-assigned unique ID for this managed resource.
- vpn
Connection StringId - The ID of the VPN connection.
- id string
- The provider-assigned unique ID for this managed resource.
- vpn
Connection stringId - The ID of the VPN connection.
- id str
- The provider-assigned unique ID for this managed resource.
- vpn_
connection_ strid - The ID of the VPN connection.
- id String
- The provider-assigned unique ID for this managed resource.
- vpn
Connection StringId - The ID of the VPN connection.
Supporting Types
Tag, TagArgs
VpnConnectionVpnTunnelOptionsSpecification, VpnConnectionVpnTunnelOptionsSpecificationArgs
- string
- The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).
- Tunnel
Inside stringCidr - The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the
169.254.0.0/16
range. The following CIDR blocks are reserved and cannot be used:169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
- string
- The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).
- Tunnel
Inside stringCidr - The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the
169.254.0.0/16
range. The following CIDR blocks are reserved and cannot be used:169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
- String
- The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).
- tunnel
Inside StringCidr - The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the
169.254.0.0/16
range. The following CIDR blocks are reserved and cannot be used:169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
- string
- The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).
- tunnel
Inside stringCidr - The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the
169.254.0.0/16
range. The following CIDR blocks are reserved and cannot be used:169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
- str
- The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).
- tunnel_
inside_ strcidr - The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the
169.254.0.0/16
range. The following CIDR blocks are reserved and cannot be used:169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
- String
- The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).
- tunnel
Inside StringCidr - The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the
169.254.0.0/16
range. The following CIDR blocks are reserved and cannot be used:169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.