» alicloud_vswitch

Provides a VPC switch resource.

» Example Usage

Basic Usage

resource "alicloud_vpc" "vpc" {
  name       = "tf_test_foo"
  cidr_block = ""

resource "alicloud_vswitch" "vsw" {
  vpc_id            = "${alicloud_vpc.vpc.id}"
  cidr_block        = ""
  availability_zone = "cn-beijing-b"

» Module Support

You can use to the existing vpc module to create a VPC and several VSwitches one-click.

» Argument Reference

The following arguments are supported:

  • availability_zone - (Required, ForceNew) The AZ for the switch.
  • vpc_id - (Required, ForceNew) The VPC ID.
  • cidr_block - (Required, ForceNew) The CIDR block for the switch.
  • name - (Optional) The name of the switch. Defaults to null.
  • description - (Optional) The switch description. Defaults to null.
  • tags - (Optional, Available in v1.55.3+) A mapping of tags to assign to the resource.

» Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 10 mins) Used when creating the vswitch (until it reaches the initial Available status).
  • delete - (Defaults to 10 mins) Used when terminating the vswitch.

» Attributes Reference

The following attributes are exported:

» Import

Vswitch can be imported using the id, e.g.

$ terraform import alicloud_vswitch.example vsw-abc123456