2017-01-19 15:08:56 +01:00
|
|
|
---
|
|
|
|
layout: "alicloud"
|
|
|
|
page_title: "Alicloud: alicloud_slb_attachment"
|
|
|
|
sidebar_current: "docs-alicloud-resource-slb-attachment"
|
|
|
|
description: |-
|
|
|
|
Provides an Application Load Banlancer Attachment resource.
|
|
|
|
---
|
|
|
|
|
2017-04-05 17:30:46 +02:00
|
|
|
# alicloud_slb_attachment
|
2017-01-19 15:08:56 +01:00
|
|
|
|
|
|
|
Provides an Application Load Balancer Attachment resource.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-05 17:30:46 +02:00
|
|
|
```hcl
|
2017-01-19 15:08:56 +01:00
|
|
|
# Create a new load balancer attachment for classic
|
|
|
|
resource "alicloud_slb" "default" {
|
2017-04-05 17:30:46 +02:00
|
|
|
# ...
|
2017-01-19 15:08:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "alicloud_instance" "default" {
|
2017-04-05 17:30:46 +02:00
|
|
|
# ...
|
2017-01-19 15:08:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "alicloud_slb_attachment" "default" {
|
2017-02-18 23:48:50 +01:00
|
|
|
slb_id = "${alicloud_slb.default.id}"
|
|
|
|
instances = ["${alicloud_instance.default.id}"]
|
2017-01-19 15:08:56 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `slb_id` - (Required) The ID of the SLB..
|
|
|
|
* `instances` - (Required) A list of instance ids to added backend server in the SLB. If dettachment instances then this value set [].
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `backend_servers` - The backend servers of the load balancer.
|