» alicloud_route_tables

This data source provides a list of Route Tables owned by an Alibaba Cloud account.

» Example Usage

variable "name" {
  default = "tf-testAcc-for-route-tables-datasource"
}

resource "alicloud_vpc" "foo" {
    cidr_block = "172.16.0.0/12"
    name = "${var.name}"
}

resource "alicloud_route_table" "foo" {
  vpc_id = "${alicloud_vpc.foo.id}"
  name = "${var.name}"
  description = "${var.name}"
}

data "alicloud_route_tables" "foo" {
  ids = ["${alicloud_route_table.foo.id}"]
}

» Argument Reference

The following arguments are supported:

  • ids - (Optional) A list of Route Tables IDs.
  • name_regex - (Optional) A regex string to filter route tables by name.
  • vpc_id - (Optional) Vpc id of the route table.
  • output_file - (Optional) File name where to save data source results (after running terraform plan).

» Attributes Reference

The following attributes are exported in addition to the arguments listed above:

  • ids - (Optional) A list of Route Tables IDs.
  • names - A list of Route Tables names.
  • tables - A list of Route Tables. Each element contains the following attributes: