alicloud_nat_gateways

This data source provides a list of Nat Gateways owned by an Alibaba Cloud account.

Example Usage

variable "name" {
  default = "natGatewaysDatasource"
}

data "alicloud_zones" "default" {
  available_resource_creation = "VSwitch"
}

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

resource "alicloud_nat_gateway" "foo" {
  vpc_id        = "${alicloud_vpc.foo.id}"
  specification = "Small"
  nat_gate_name = "${var.name}"
}

data "alicloud_nat_gateways" "foo" {
  vpc_id     = "${alicloud_vpc.foo.id}"
  name_regex = "${alicloud_nat_gateway.foo.name}"
  ids        = ["${alicloud_nat_gateway.foo.id}"]
}

Argument Reference

The following arguments are supported:

Attributes Reference

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