2017-01-19 15:08:56 +01:00
|
|
|
---
|
|
|
|
layout: "alicloud"
|
|
|
|
page_title: "Alicloud: alicloud_vswitch"
|
|
|
|
sidebar_current: "docs-alicloud-resource-vswitch"
|
|
|
|
description: |-
|
|
|
|
Provides a Alicloud VPC switch resource.
|
|
|
|
---
|
|
|
|
|
2017-04-05 17:30:46 +02:00
|
|
|
# alicloud_vswitch
|
2017-01-19 15:08:56 +01:00
|
|
|
|
|
|
|
Provides a VPC switch resource.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
Basic Usage
|
|
|
|
|
2017-04-05 17:30:46 +02:00
|
|
|
```hcl
|
2017-01-19 15:08:56 +01:00
|
|
|
resource "alicloud_vpc" "vpc" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "tf_test_foo"
|
2017-01-19 15:08:56 +01:00
|
|
|
cidr_block = "172.16.0.0/12"
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "alicloud_vswitch" "vsw" {
|
2017-02-18 23:48:50 +01:00
|
|
|
vpc_id = "${alicloud_vpc.vpc.id}"
|
|
|
|
cidr_block = "172.16.0.0/21"
|
2017-01-19 15:08:56 +01:00
|
|
|
availability_zone = "cn-beijing-b"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `availability_zone` - (Required, Forces new resource) The AZ for the switch.
|
|
|
|
* `vpc_id` - (Required, Forces new resource) The VPC ID.
|
|
|
|
* `cidr_block` - (Required, Forces new resource) The CIDR block for the switch.
|
|
|
|
* `name` - (Optional) The name of the switch. Defaults to null.
|
|
|
|
* `description` - (Optional) The switch description. Defaults to null.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The ID of the switch.
|
|
|
|
* `availability_zone` The AZ for the switch.
|
|
|
|
* `cidr_block` - The CIDR block for the switch.
|
|
|
|
* `vpc_id` - The VPC ID.
|
|
|
|
* `name` - The name of the switch.
|
|
|
|
* `description` - The description of the switch.
|