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,
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
region = config.get("region")
if region is None:
    region = "cn-hangzhou"
name = config.get("name")
if name is None:
    name = "alicloudRouterInterfaceConnectionBasic"
foo_network = alicloud.vpc.Network("fooNetwork", cidr_block="172.16.0.0/12")
bar_network = alicloud.vpc.Network("barNetwork", cidr_block="192.168.0.0/16")
initiate = alicloud.vpc.RouterInterface("initiate",
    description=name,
    instance_charge_type="PostPaid",
    opposite_region=region,
    role="InitiatingSide",
    router_id=foo_network.router_id,
    router_type="VRouter",
    specification="Large.2")
opposite = alicloud.vpc.RouterInterface("opposite",
    description=f"{name}-opposite",
    opposite_region=region,
    role="AcceptingSide",
    router_id=bar_network.router_id,
    router_type="VRouter",
    specification="Large.1")
# A integrated router interface connection tunnel requires both InitiatingSide and AcceptingSide configuring opposite router interface.
foo_router_interface_connection = alicloud.vpc.RouterInterfaceConnection("fooRouterInterfaceConnection",
    interface_id=initiate.id,
    opposite_interface_id=opposite.id)
bar_router_interface_connection = alicloud.vpc.RouterInterfaceConnection("barRouterInterfaceConnection",
    interface_id=opposite.id,
    opposite_interface_id=initiate.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const region = config.get("region") || "cn-hangzhou";
const name = config.get("name") || "alicloudRouterInterfaceConnectionBasic";

const fooNetwork = new alicloud.vpc.Network("foo", {
    cidrBlock: "172.16.0.0/12",
});
const barNetwork = new alicloud.vpc.Network("bar", {
    cidrBlock: "192.168.0.0/16",
});
const initiate = new alicloud.vpc.RouterInterface("initiate", {
    description: name,
    instanceChargeType: "PostPaid",
    oppositeRegion: region,
    role: "InitiatingSide",
    routerId: fooNetwork.routerId,
    routerType: "VRouter",
    specification: "Large.2",
});
const opposite = new alicloud.vpc.RouterInterface("opposite", {
    description: `${name}-opposite`,
    oppositeRegion: region,
    role: "AcceptingSide",
    routerId: barNetwork.routerId,
    routerType: "VRouter",
    specification: "Large.1",
});
const barRouterInterfaceConnection = new alicloud.vpc.RouterInterfaceConnection("bar", {
    interfaceId: opposite.id,
    oppositeInterfaceId: initiate.id,
});
// A integrated router interface connection tunnel requires both InitiatingSide and AcceptingSide configuring opposite router interface.
const fooRouterInterfaceConnection = new alicloud.vpc.RouterInterfaceConnection("foo", {
    interfaceId: initiate.id,
    oppositeInterfaceId: opposite.id,
}, { dependsOn: [barRouterInterfaceConnection] });

Create a RouterInterfaceConnection Resource

def RouterInterfaceConnection(resource_name, opts=None, interface_id=None, opposite_interface_id=None, opposite_interface_owner_id=None, opposite_router_id=None, opposite_router_type=None, __props__=None);
name string
The unique name of the resource.
args RouterInterfaceConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RouterInterfaceConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RouterInterfaceConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RouterInterfaceConnection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The RouterInterfaceConnection resource accepts the following input properties:

InterfaceId string

One side router interface ID.

OppositeInterfaceId string

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

OppositeInterfaceOwnerId string
OppositeRouterId string

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.

OppositeRouterType string

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

InterfaceId string

One side router interface ID.

OppositeInterfaceId string

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

OppositeInterfaceOwnerId string
OppositeRouterId string

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.

OppositeRouterType string

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

interfaceId string

One side router interface ID.

oppositeInterfaceId string

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

oppositeInterfaceOwnerId string
oppositeRouterId string

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.

oppositeRouterType string

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

interface_id str

One side router interface ID.

opposite_interface_id str

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

opposite_interface_owner_id str
opposite_router_id str

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.

opposite_router_type str

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

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing RouterInterfaceConnection Resource

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

static get(resource_name, id, opts=None, interface_id=None, opposite_interface_id=None, opposite_interface_owner_id=None, opposite_router_id=None, opposite_router_type=None, __props__=None);
func GetRouterInterfaceConnection(ctx *Context, name string, id IDInput, state *RouterInterfaceConnectionState, opts ...ResourceOption) (*RouterInterfaceConnection, error)
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.

The following state arguments are supported:

InterfaceId string

One side router interface ID.

OppositeInterfaceId string

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

OppositeInterfaceOwnerId string
OppositeRouterId string

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.

OppositeRouterType string

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

InterfaceId string

One side router interface ID.

OppositeInterfaceId string

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

OppositeInterfaceOwnerId string
OppositeRouterId string

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.

OppositeRouterType string

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

interfaceId string

One side router interface ID.

oppositeInterfaceId string

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

oppositeInterfaceOwnerId string
oppositeRouterId string

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.

oppositeRouterType string

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

interface_id str

One side router interface ID.

opposite_interface_id str

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

opposite_interface_owner_id str
opposite_router_id str

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.

opposite_router_type str

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.