Class VpnConnectionRoute
Provides a static route between a VPN connection and a customer gateway.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var vpc = new Aws.Ec2.Vpc("vpc", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.0.0.0/16",
});
var vpnGateway = new Aws.Ec2.VpnGateway("vpnGateway", new Aws.Ec2.VpnGatewayArgs
{
VpcId = vpc.Id,
});
var customerGateway = new Aws.Ec2.CustomerGateway("customerGateway", new Aws.Ec2.CustomerGatewayArgs
{
BgpAsn = 65000,
IpAddress = "172.0.0.1",
Type = "ipsec.1",
});
var main = new Aws.Ec2.VpnConnection("main", new Aws.Ec2.VpnConnectionArgs
{
CustomerGatewayId = customerGateway.Id,
StaticRoutesOnly = true,
Type = "ipsec.1",
VpnGatewayId = vpnGateway.Id,
});
var office = new Aws.Ec2.VpnConnectionRoute("office", new Aws.Ec2.VpnConnectionRouteArgs
{
DestinationCidrBlock = "192.168.10.0/24",
VpnConnectionId = main.Id,
});
}
}
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class VpnConnectionRoute : CustomResource
Constructors
View SourceVpnConnectionRoute(String, VpnConnectionRouteArgs, CustomResourceOptions)
Create a VpnConnectionRoute resource with the given unique name, arguments, and options.
Declaration
public VpnConnectionRoute(string name, VpnConnectionRouteArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VpnConnectionRouteArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDestinationCidrBlock
The CIDR block associated with the local subnet of the customer network.
Declaration
public Output<string> DestinationCidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VpnConnectionId
The ID of the VPN connection.
Declaration
public Output<string> VpnConnectionId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, VpnConnectionRouteState, CustomResourceOptions)
Get an existing VpnConnectionRoute resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static VpnConnectionRoute Get(string name, Input<string> id, VpnConnectionRouteState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| VpnConnectionRouteState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| VpnConnectionRoute |