• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language HCL
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Terraform module to create AWS ELB resources πŸ‡ΊπŸ‡¦

AWS Elastic Load Balancer (ELB) Terraform module

Terraform module which creates Classic Load Balancer (also called ELB) resources on AWS.

Usage

module "elb_http" {
  source  = "terraform-aws-modules/elb/aws"
  version = "~> 2.0"

  name = "elb-example"

  subnets         = ["subnet-12345678", "subnet-87654321"]
  security_groups = ["sg-12345678"]
  internal        = false

  listener = [
    {
      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

Note about SSL

Requirements

Name Version
terraform >= 1.0
aws >= 4.0

Providers

No providers.

Modules

Name Source Version
elb ./modules/elb n/a
elb_attachment ./modules/elb_attachment n/a

Resources

No resources.

Inputs

Name Description Type Default Required
access_logs An access logs block map(string) {} no
connection_draining Boolean to enable connection draining bool false no
connection_draining_timeout The time in seconds to allow for connections to drain number 300 no
create_elb Create the elb or not bool true no
cross_zone_load_balancing Enable cross-zone load balancing bool true no
health_check A health check block map(string) n/a yes
idle_timeout The time in seconds that the connection is allowed to be idle number 60 no
instances List of instances ID to place in the ELB pool list(string) [] no
internal If true, ELB will be an internal ELB bool false no
listener A list of listener blocks list(map(string)) n/a yes
name The name of the ELB string null no
name_prefix The prefix name of the ELB string null no
number_of_instances Number of instances to attach to ELB number 0 no
security_groups A list of security group IDs to assign to the ELB list(string) n/a yes
subnets A list of subnet IDs to attach to the ELB list(string) n/a yes
tags A mapping of tags to assign to the resource map(string) {} no

Outputs

Name Description
elb_arn The ARN of the ELB
elb_dns_name The DNS name of the ELB
elb_id The name of the ELB
elb_instances The list of instances in the ELB
elb_name The name of the ELB
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 The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)

Authors

Module is maintained by Anton Babenko with help from these awesome contributors.

License

Apache 2 Licensed. See LICENSE for full details.

More Repositories

1

terraform-aws-eks

Terraform module to create Amazon Elastic Kubernetes (EKS) resources πŸ‡ΊπŸ‡¦
HCL
4,372
star
2

terraform-aws-vpc

Terraform module to create AWS VPC resources πŸ‡ΊπŸ‡¦
HCL
2,949
star
3

terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations πŸ‡ΊπŸ‡¦
HCL
899
star
4

terraform-aws-rds

Terraform module to create AWS RDS resources πŸ‡ΊπŸ‡¦
HCL
879
star
5

terraform-aws-iam

Terraform module to create AWS IAM resources πŸ‡ΊπŸ‡¦
HCL
779
star
6

terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources πŸ‡ΊπŸ‡¦
HCL
751
star
7

terraform-aws-security-group

Terraform module to create AWS Security Group resources πŸ‡ΊπŸ‡¦
HCL
563
star
8

terraform-aws-ecs

Terraform module to create AWS ECS resources πŸ‡ΊπŸ‡¦
HCL
555
star
9

terraform-aws-atlantis

Terraform module to deploy Atlantis on AWS Fargate πŸ‡ΊπŸ‡¦
HCL
519
star
10

terraform-aws-s3-bucket

Terraform module to create AWS S3 resources πŸ‡ΊπŸ‡¦
HCL
511
star
11

terraform-aws-notify-slack

Terraform module to create AWS resources for sending notifications to Slack πŸ‡ΊπŸ‡¦
Python
466
star
12

terraform-aws-alb

Terraform module to create AWS Application/Network Load Balancer (ALB/NLB) resources πŸ‡ΊπŸ‡¦
HCL
433
star
13

terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources πŸ‡ΊπŸ‡¦
HCL
384
star
14

terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources πŸ‡ΊπŸ‡¦
HCL
292
star
15

terraform-aws-pricing

Terraform module which calculates price of AWS infrastructure (from Terraform state and plan) πŸ‡ΊπŸ‡¦
HCL
183
star
16

terraform-aws-acm

Terraform module to create AWS ACM resources πŸ‡ΊπŸ‡¦
HCL
182
star
17

terraform-aws-cloudwatch

Terraform module to create AWS Cloudwatch resources πŸ‡ΊπŸ‡¦
HCL
163
star
18

terraform-aws-apigateway-v2

Terraform module to create AWS API Gateway v2 (HTTP/WebSocket) πŸ‡ΊπŸ‡¦
HCL
146
star
19

terraform-aws-eventbridge

Terraform module to create AWS EventBridge resources πŸ‡ΊπŸ‡¦
HCL
142
star
20

terraform-aws-transit-gateway

Terraform module to create AWS Transit Gateway resources πŸ‡ΊπŸ‡¦
HCL
141
star
21

terraform-aws-route53

Terraform module to create AWS Route53 resources πŸ‡ΊπŸ‡¦
HCL
126
star
22

terraform-aws-cloudfront

Terraform module to create AWS CloudFront resources πŸ‡ΊπŸ‡¦
HCL
119
star
23

terraform-aws-vpn-gateway

Terraform module to create AWS VPN gateway resources πŸ‡ΊπŸ‡¦
HCL
111
star
24

terraform-aws-dynamodb-table

Terraform module to create AWS DynamoDB resources πŸ‡ΊπŸ‡¦
HCL
100
star
25

terraform-aws-sns

Terraform module to create AWS SNS resources πŸ‡ΊπŸ‡¦
HCL
95
star
26

terraform-aws-sqs

Terraform module to create AWS SQS resources πŸ‡ΊπŸ‡¦
HCL
92
star
27

terraform-aws-key-pair

Terraform module to create AWS EC2 key pair resources πŸ‡ΊπŸ‡¦
HCL
83
star
28

terraform-aws-redshift

Terraform module to create AWS Redshift resources πŸ‡ΊπŸ‡¦
HCL
81
star
29

meta

Meta-configurations for repositories, teams, files in terraform-aws-modules organization πŸ‡ΊπŸ‡¦
HCL
76
star
30

terraform-aws-solutions

Set of standalone and reusable AWS/DevOps solutions implemented as Terraform modules πŸ‡ΊπŸ‡¦
HCL
75
star
31

terraform-aws-step-functions

Terraform module to create AWS Step Functions πŸ‡ΊπŸ‡¦
HCL
70
star
32

terraform-aws-dms

Terraform module to create AWS DMS (Database Migration Service) resources πŸ‡ΊπŸ‡¦
HCL
62
star
33

terraform-aws-rds-proxy

Terraform module to create AWS RDS Proxy resources πŸ‡ΊπŸ‡¦
HCL
56
star
34

terraform-aws-msk-kafka-cluster

Terraform module to create AWS MSK (Managed Streaming for Kafka) resources πŸ‡ΊπŸ‡¦
HCL
55
star
35

terraform-aws-datadog-forwarders

Terraform module to create resources on AWS to forward logs/metrics to Datadog πŸ‡ΊπŸ‡¦
HCL
53
star
36

terraform-aws-eks-pod-identity

Terraform module to create AWS EKS Pod Identity resources πŸ‡ΊπŸ‡¦
HCL
52
star
37

terraform-aws-appsync

Terraform module to create AWS AWS AppSync resources πŸ‡ΊπŸ‡¦
HCL
50
star
38

terraform-aws-kms

Terraform module to create AWS KMS resources πŸ‡ΊπŸ‡¦
HCL
49
star
39

terraform-aws-ecr

Terraform module to create AWS ECR resources πŸ‡ΊπŸ‡¦
HCL
49
star
40

terraform-aws-managed-service-grafana

Terraform module to create AWS Managed Service for Grafana (AMG) resources πŸ‡ΊπŸ‡¦
HCL
36
star
41

terraform-aws-batch

Terraform module to create AWS Batch resources πŸ‡ΊπŸ‡¦
HCL
35
star
42

terraform-aws-app-runner

Terraform module to create AWS App Runner resources πŸ‡ΊπŸ‡¦
HCL
32
star
43

terraform-aws-secrets-manager

Terraform module to create AWS Secrets Manager resources πŸ‡ΊπŸ‡¦
HCL
28
star
44

terraform-aws-appconfig

Terraform module to create AWS AppConfig resources πŸ‡ΊπŸ‡¦
HCL
27
star
45

terraform-aws-managed-service-prometheus

Terraform module to create AWS Managed Service for Prometheus (AMP) resources πŸ‡ΊπŸ‡¦
HCL
26
star
46

terraform-aws-efs

Terraform module to create AWS EFS resources πŸ‡ΊπŸ‡¦
HCL
24
star
47

terraform-aws-emr

Terraform module to create AWS EMR resources πŸ‡ΊπŸ‡¦
HCL
23
star
48

.github

Meta-GitHub repository for all terraform-aws-modules repositories πŸ‡ΊπŸ‡¦
22
star
49

terraform-aws-ssm-parameter

Terraform module to create AWS SSM Parameter resources πŸ‡ΊπŸ‡¦
HCL
20
star
50

terraform-aws-s3-object

Terraform module which creates S3 object resources on AWS
HCL
17
star
51

terraform-aws-ebs-optimized

Terraform module to determine if an instance can be flagged for EBS optimization
HCL
17
star
52

terraform-aws-customer-gateway

Terraform module to create AWS Customer Gateway resources πŸ‡ΊπŸ‡¦
HCL
17
star
53

terraform-aws-global-accelerator

Terraform module to create AWS Global Accelerator resources πŸ‡ΊπŸ‡¦
HCL
16
star
54

terraform-aws-memory-db

Terraform module to create AWS MemoryDB resources πŸ‡ΊπŸ‡¦
HCL
16
star
55

terraform-aws-opensearch

Terraform module to create AWS OpenSearch resources πŸ‡ΊπŸ‡¦
HCL
15
star
56

terraform-aws-elasticache

Terraform module to create AWS ElastiCache resources πŸ‡ΊπŸ‡¦
HCL
12
star
57

terraform-aws-network-firewall

Terraform module to create AWS Network Firewall resources πŸ‡ΊπŸ‡¦
HCL
12
star
58

terraform-aws-fsx

Terraform module to create AWS FSx resources πŸ‡ΊπŸ‡¦
HCL
4
star
59

atlantis-demo

Demo repository for Atlantis
3
star