Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terraform-aws-modules/terraform-aws-elb
Terraform module to create AWS ELB resources πΊπ¦
https://github.com/terraform-aws-modules/terraform-aws-elb
aws aws-elb elb terraform-module
Last synced: 4 days ago
JSON representation
Terraform module to create AWS ELB resources πΊπ¦
- Host: GitHub
- URL: https://github.com/terraform-aws-modules/terraform-aws-elb
- Owner: terraform-aws-modules
- License: apache-2.0
- Created: 2017-09-14T08:51:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T16:04:32.000Z (2 months ago)
- Last Synced: 2024-11-28T17:23:03.630Z (14 days ago)
- Topics: aws, aws-elb, elb, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/terraform-aws-modules/elb/aws
- Size: 90.8 KB
- Stars: 145
- Watchers: 10
- Forks: 259
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-terraform - terraform-aws-elb - Created Elastic load-balancer on AWS (verified module). (Community Modules / Miscellaneous)
- awesome-tf - terraform-aws-elb - Creates Elastic load-balancer on AWS (verified module). (Community Modules / Miscellaneous)
README
# AWS Elastic Load Balancer (ELB) Terraform module
Terraform module which creates Classic Load Balancer (also called ELB) resources on AWS.
## Usage
```hcl
module "elb_http" {
source = "terraform-aws-modules/elb/aws"name = "elb-example"
subnets = ["subnet-12345678", "subnet-87654321"]
security_groups = ["sg-12345678"]
internal = falselistener = [
{
instance_port = 80
instance_protocol = "HTTP"
lb_port = 80
lb_protocol = "HTTP"
},
{
instance_port = 8080
instance_protocol = "http"
lb_port = 8080
lb_protocol = "http"
ssl_certificate_id = "arn:aws:acm:eu-west-1:235367859451:certificate/6c270328-2cd5-4b2d-8dfd-ae8d0004ad31"
},
]health_check = {
target = "HTTP:80/"
interval = 30
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 5
}access_logs = {
bucket = "my-access-logs-bucket"
}// ELB attachments
number_of_instances = 2
instances = ["i-06ff41a77dfb5349d", "i-4906ff41a77dfb53d"]tags = {
Owner = "user"
Environment = "dev"
}
}
```## Examples
- [Complete ELB example](https://github.com/terraform-aws-modules/terraform-aws-elb/tree/master/examples/complete)
## Note about SSL
- Valid SSL certificate has to be specified as `ssl_certificate_id` argument for secure listener. Use [terraform-aws-acm module](https://github.com/terraform-aws-modules/terraform-aws-acm) to create one.
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0 |## Providers
No providers.
## Modules
| Name | Source | Version |
|------|--------|---------|
| [elb](#module\_elb) | ./modules/elb | n/a |
| [elb\_attachment](#module\_elb\_attachment) | ./modules/elb_attachment | n/a |## Resources
No resources.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [access\_logs](#input\_access\_logs) | An access logs block | `map(string)` | `{}` | no |
| [connection\_draining](#input\_connection\_draining) | Boolean to enable connection draining | `bool` | `false` | no |
| [connection\_draining\_timeout](#input\_connection\_draining\_timeout) | The time in seconds to allow for connections to drain | `number` | `300` | no |
| [create\_elb](#input\_create\_elb) | Create the elb or not | `bool` | `true` | no |
| [cross\_zone\_load\_balancing](#input\_cross\_zone\_load\_balancing) | Enable cross-zone load balancing | `bool` | `true` | no |
| [health\_check](#input\_health\_check) | A health check block | `map(string)` | n/a | yes |
| [idle\_timeout](#input\_idle\_timeout) | The time in seconds that the connection is allowed to be idle | `number` | `60` | no |
| [instances](#input\_instances) | List of instances ID to place in the ELB pool | `list(string)` | `[]` | no |
| [internal](#input\_internal) | If true, ELB will be an internal ELB | `bool` | `false` | no |
| [listener](#input\_listener) | A list of listener blocks | `list(map(string))` | n/a | yes |
| [name](#input\_name) | The name of the ELB | `string` | `null` | no |
| [name\_prefix](#input\_name\_prefix) | The prefix name of the ELB | `string` | `null` | no |
| [number\_of\_instances](#input\_number\_of\_instances) | Number of instances to attach to ELB | `number` | `0` | no |
| [security\_groups](#input\_security\_groups) | A list of security group IDs to assign to the ELB | `list(string)` | n/a | yes |
| [subnets](#input\_subnets) | A list of subnet IDs to attach to the ELB | `list(string)` | n/a | yes |
| [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |## Outputs
| Name | Description |
|------|-------------|
| [elb\_arn](#output\_elb\_arn) | The ARN of the ELB |
| [elb\_dns\_name](#output\_elb\_dns\_name) | The DNS name of the ELB |
| [elb\_id](#output\_elb\_id) | The name of the ELB |
| [elb\_instances](#output\_elb\_instances) | The list of instances in the ELB |
| [elb\_name](#output\_elb\_name) | The name of the ELB |
| [elb\_source\_security\_group\_id](#output\_elb\_source\_security\_group\_id) | The ID of the security group that you can use as part of your inbound rules for your load balancer's back-end application instances |
| [elb\_zone\_id](#output\_elb\_zone\_id) | The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) |## Authors
Module is maintained by [Anton Babenko](https://github.com/antonbabenko) with help from [these awesome contributors](https://github.com/terraform-aws-modules/terraform-aws-elb/graphs/contributors).
## License
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-elb/tree/master/LICENSE) for full details.