» alicloud_slb_attachments
This data source provides the server load balancer attachments of the current Alibaba Cloud user.
» Example Usage
data "alicloud_slb_attachments" "sample_ds" {
load_balancer_id = "${alicloud_slb.sample_slb.id}"
}
output "first_slb_attachment_instance_id" {
value = "${data.alicloud_slb_attachments.sample_ds.slb_attachments.0.instance_id}"
}
» Argument Reference
The following arguments are supported:
-
load_balancer_id
- ID of the SLB with attachments. -
instance_ids
- (Optional) List of attached ECS instance IDs. -
output_file
- (Optional) File name where to save data source results (after runningterraform plan
).
» Attributes Reference
The following attributes are exported in addition to the arguments listed above:
-
slb_attachments
- A list of SLB attachments. Each element contains the following attributes:-
instance_id
- ID of the attached ECS instance. -
weight
- Weight associated to the ECS instance.
-