github.com/ezbercih/terraform@v0.1.1-0.20140729011846-3c33865e0839/website/source/docs/providers/aws/r/elb.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_elb" 4 sidebar_current: "docs-aws-resource-elb" 5 --- 6 7 # aws\_elb 8 9 Provides an Elastic Load Balancer resource. 10 11 ## Example Usage 12 13 ``` 14 # Create a new load balancer 15 resource "aws_elb" "bar" { 16 name = "foobar-terraform-elb" 17 availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"] 18 19 listener { 20 instance_port = 8000 21 instance_protocol = "http" 22 lb_port = 80 23 lb_protocol = "http" 24 } 25 26 instances = ["${aws_instance.foo.id}"] 27 } 28 ``` 29 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `name` - (Required) The name of the ELB 35 * `availability_zones` - (Optional) The AZ's to serve traffic in. 36 * `instances` - (Optional) A list of instance ids to place in the ELB pool. 37 * `listener` - (Required) A list of listener blocks. Listeners documented below. 38 39 Listeners support the following: 40 41 * `instance_port` - (Required) The port on the instance to route to 42 * `instance_protocol` - (Required) The the protocol to use to the instance. 43 * `lb_port` - (Required) The port to listen on for the load balancer 44 * `lb_protocol` - (Required) The protocol to listen on. 45 46 ## Attributes Reference 47 48 The following attributes are exported: 49 50 * `id` - The name of the ELB 51 * `name` - The name of the ELB 52 * `dns_name` - The DNS name of the ELB 53 * `instances` - The list of instances in the ELB 54