Git Product home page Git Product logo

elbcode's Introduction

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.

elbcode's People

Contributors

antonbabenko avatar betajobot avatar brunocriado avatar bryantbiggs avatar dev-slatto avatar gstlt avatar hatemosphere avatar semantic-release-bot avatar theeternalrat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.