Router Interface
Provides a VPC router interface resource aim to build a connection between two VPCs.
DEPRECATED: This resource has been deprecated from version
1.199.0
. Please use new resource alicloud_express_connect_router_interface. NOTE: Only one pair of connected router interfaces can exist between two routers. Up to 5 router interfaces can be created for each router and each account. NOTE: The router interface is not connected when it is created. It can be connected by means of resource alicloud_router_interface_connection.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const foo = new alicloud.vpc.Network("foo", {
vpcName: "tf_test_foo12345",
cidrBlock: "172.16.0.0/12",
});
const _interface = new alicloud.vpc.RouterInterface("interface", {
oppositeRegion: "cn-beijing",
routerType: "VRouter",
routerId: foo.routerId,
role: "InitiatingSide",
specification: "Large.2",
name: "test1",
description: "test1",
});
import pulumi
import pulumi_alicloud as alicloud
foo = alicloud.vpc.Network("foo",
vpc_name="tf_test_foo12345",
cidr_block="172.16.0.0/12")
interface = alicloud.vpc.RouterInterface("interface",
opposite_region="cn-beijing",
router_type="VRouter",
router_id=foo.router_id,
role="InitiatingSide",
specification="Large.2",
name="test1",
description="test1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var foo = new AliCloud.Vpc.Network("foo", new()
{
VpcName = "tf_test_foo12345",
CidrBlock = "172.16.0.0/12",
});
var @interface = new AliCloud.Vpc.RouterInterface("interface", new()
{
OppositeRegion = "cn-beijing",
RouterType = "VRouter",
RouterId = foo.RouterId,
Role = "InitiatingSide",
Specification = "Large.2",
Name = "test1",
Description = "test1",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := vpc.NewNetwork(ctx, "foo", &vpc.NetworkArgs{
VpcName: pulumi.String("tf_test_foo12345"),
CidrBlock: pulumi.String("172.16.0.0/12"),
})
if err != nil {
return err
}
_, err = vpc.NewRouterInterface(ctx, "interface", &vpc.RouterInterfaceArgs{
OppositeRegion: pulumi.String("cn-beijing"),
RouterType: pulumi.String("VRouter"),
RouterId: foo.RouterId,
Role: pulumi.String("InitiatingSide"),
Specification: pulumi.String("Large.2"),
Name: pulumi.String("test1"),
Description: pulumi.String("test1"),
})
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.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.RouterInterface;
import com.pulumi.alicloud.vpc.RouterInterfaceArgs;
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 foo = new Network("foo", NetworkArgs.builder()
.vpcName("tf_test_foo12345")
.cidrBlock("172.16.0.0/12")
.build());
var interface_ = new RouterInterface("interface", RouterInterfaceArgs.builder()
.oppositeRegion("cn-beijing")
.routerType("VRouter")
.routerId(foo.routerId())
.role("InitiatingSide")
.specification("Large.2")
.name("test1")
.description("test1")
.build());
}
}
resources:
foo:
type: alicloud:vpc:Network
properties:
vpcName: tf_test_foo12345
cidrBlock: 172.16.0.0/12
interface:
type: alicloud:vpc:RouterInterface
properties:
oppositeRegion: cn-beijing
routerType: VRouter
routerId: ${foo.routerId}
role: InitiatingSide
specification: Large.2
name: test1
description: test1
Import
The router interface can be imported using the id, e.g.
$ pulumi import alicloud:vpc/routerInterface:RouterInterface interface ri-abc123456
Properties
It has been deprecated from version 1.11.0.
Description of the router interface. It can be 2-256 characters long or left blank. It cannot start with http:// and https://.
Used as the Packet Source IP of health check for disaster recovery or ECMP. It is only valid when router_type
is VBR
. The IP must be an unused IP in the local VPC. It and health_check_target_ip
must be specified at the same time.
Used as the Packet Target IP of health check for disaster recovery or ECMP. It is only valid when router_type
is VBR
. The IP must be an unused IP in the local VPC. It and health_check_source_ip
must be specified at the same time.
The billing method of the router interface. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid". Router Interface doesn't support "PrePaid" when region and opposite_region are the same.
Name of the router interface. Length must be 2-80 characters long. Only Chinese characters, English letters, numbers, period (.), underline (_), or dash (-) are permitted. If it is not specified, the default value is interface ID. The name cannot start with http:// and https://.
It has been deprecated from version 1.11.0.
It has been deprecated from version 1.11.0. Use resource alicloud_router_interface_connection's 'opposite_router_id' instead.
It has been deprecated from version 1.11.0. Use resource alicloud_router_interface_connection's 'opposite_interface_id' instead.
The Region of peer side.
It has been deprecated from version 1.11.0. Use resource alicloud_router_interface_connection's 'opposite_router_id' instead.
It has been deprecated from version 1.11.0. resource alicloud_router_interface_connection's 'opposite_router_type' instead.
Router Type. Optional value: VRouter, VBR. Accepting side router interface type only be VRouter.
Specification of router interfaces. It is valid when role
is InitiatingSide
. Accepting side's role is default to set as 'Negative'. For more about the specification, refer to Router interface specification.