» alicloud_router_interface

Provides a VPC router interface resource aim to build a connection between two VPCs.

» Example Usage

resource "alicloud_vpc" "foo" {
  name = "tf_test_foo12345"
  cidr_block = "172.16.0.0/12"
}

resource "alicloud_router_interface" "interface" {
  opposite_region = "cn-beijing"
  router_type = "VRouter"
  router_id = "${alicloud_vpc.foo.router_id}"
  role = "InitiatingSide"
  specification = "Large.2"
  name = "test1"
  description = "test1"
}

» Argument Reference

The following arguments are supported:

  • opposite_region - (Required, ForceNew) The Region of peer side.
  • router_type - (Required, ForceNew) Router Type. Optional value: VRouter, VBR. Accepting side router interface type only be VRouter.
  • opposite_router_type - (Deprecated) It has been deprecated from version 1.11.0. resource alicloud_router_interface_connection's 'opposite_router_type' instead.
  • router_id - (Required, ForceNew) The Router ID.
  • opposite_router_id - (Deprecated) It has been deprecated from version 1.11.0. Use resource alicloud_router_interface_connection's 'opposite_router_id' instead.
  • role - (Required, ForceNew) The role the router interface plays. Optional value: InitiatingSide, AcceptingSide.
  • specification - (Optional) 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.
  • access_point_id - (Deprecated) It has been deprecated from version 1.11.0.
  • opposite_access_point_id - (Deprecated) It has been deprecated from version 1.11.0.
  • opposite_interface_id - (Deprecated) It has been deprecated from version 1.11.0. Use resource alicloud_router_interface_connection's 'opposite_router_id' instead.
  • opposite_interface_owner_id - (Deprecated) It has been deprecated from version 1.11.0. Use resource alicloud_router_interface_connection's 'opposite_interface_id' instead.
  • name - (Optional) 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://.
  • description - (Optional) Description of the router interface. It can be 2-256 characters long or left blank. It cannot start with http:// and https://.
  • health_check_source_ip - (Optional) 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.
  • health_check_target_ip - (Optional) 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.
  • instance_charge_type - (Optional, ForceNew) 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.
  • period - (Optional, ForceNew) The duration that you will buy the resource, in month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console.

» Attributes Reference

The following attributes are exported:

» Import

The router interface can be imported using the id, e.g.

$ terraform import alicloud_router_interface.interface ri-abc123456