Show / Hide Table of Contents

Class RouterInterfaceConnection

Provides a VPC router interface connection resource to connect two router interfaces which are in two different VPCs. After that, all of the two router interfaces will be active.

NOTE: At present, Router interface does not support changing opposite router interface, the connection delete action is only deactivating it to inactive, not modifying the connection to empty.

NOTE: If you want to changing opposite router interface, you can delete router interface and re-build them.

NOTE: A integrated router interface connection tunnel requires both InitiatingSide and AcceptingSide configuring opposite router interface.

NOTE: Please remember to add a depends_on clause in the router interface connection from the InitiatingSide to the AcceptingSide, because the connection from the AcceptingSide to the InitiatingSide must be done first.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var region = config.Get("region") ?? "cn-hangzhou";
    var name = config.Get("name") ?? "alicloudRouterInterfaceConnectionBasic";
    var fooNetwork = new AliCloud.Vpc.Network("fooNetwork", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/12",
    });
    var barNetwork = new AliCloud.Vpc.Network("barNetwork", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "192.168.0.0/16",
    });
    var initiate = new AliCloud.Vpc.RouterInterface("initiate", new AliCloud.Vpc.RouterInterfaceArgs
    {
        Description = name,
        InstanceChargeType = "PostPaid",
        OppositeRegion = region,
        Role = "InitiatingSide",
        RouterId = fooNetwork.RouterId,
        RouterType = "VRouter",
        Specification = "Large.2",
    });
    var opposite = new AliCloud.Vpc.RouterInterface("opposite", new AliCloud.Vpc.RouterInterfaceArgs
    {
        Description = $"{name}-opposite",
        OppositeRegion = region,
        Role = "AcceptingSide",
        RouterId = barNetwork.RouterId,
        RouterType = "VRouter",
        Specification = "Large.1",
    });
    // A integrated router interface connection tunnel requires both InitiatingSide and AcceptingSide configuring opposite router interface.
    var fooRouterInterfaceConnection = new AliCloud.Vpc.RouterInterfaceConnection("fooRouterInterfaceConnection", new AliCloud.Vpc.RouterInterfaceConnectionArgs
    {
        InterfaceId = initiate.Id,
        OppositeInterfaceId = opposite.Id,
    });
    var barRouterInterfaceConnection = new AliCloud.Vpc.RouterInterfaceConnection("barRouterInterfaceConnection", new AliCloud.Vpc.RouterInterfaceConnectionArgs
    {
        InterfaceId = opposite.Id,
        OppositeInterfaceId = initiate.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RouterInterfaceConnection
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
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.AliCloud.Vpc
Assembly: Pulumi.AliCloud.dll
Syntax
public class RouterInterfaceConnection : CustomResource

Constructors

View Source

RouterInterfaceConnection(String, RouterInterfaceConnectionArgs, CustomResourceOptions)

Create a RouterInterfaceConnection resource with the given unique name, arguments, and options.

Declaration
public RouterInterfaceConnection(string name, RouterInterfaceConnectionArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RouterInterfaceConnectionArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

InterfaceId

One side router interface ID.

Declaration
public Output<string> InterfaceId { get; }
Property Value
Type Description
Output<System.String>
View Source

OppositeInterfaceId

Another side router interface ID. It must belong the specified "opposite_interface_owner_id" account.

Declaration
public Output<string> OppositeInterfaceId { get; }
Property Value
Type Description
Output<System.String>
View Source

OppositeInterfaceOwnerId

Declaration
public Output<string> OppositeInterfaceOwnerId { get; }
Property Value
Type Description
Output<System.String>
View Source

OppositeRouterId

Another side router ID. It must belong the specified "opposite_interface_owner_id" account. It is valid when field "opposite_interface_owner_id" is specified.

Declaration
public Output<string> OppositeRouterId { get; }
Property Value
Type Description
Output<System.String>
View Source

OppositeRouterType

Another side router Type. Optional value: VRouter, VBR. It is valid when field "opposite_interface_owner_id" is specified.

Declaration
public Output<string> OppositeRouterType { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RouterInterfaceConnectionState, CustomResourceOptions)

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

Declaration
public static RouterInterfaceConnection Get(string name, Input<string> id, RouterInterfaceConnectionState 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.

RouterInterfaceConnectionState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RouterInterfaceConnection
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.