Git Product home page Git Product logo

aws-alb's Introduction

tf-aws-alb

Terraform module to create application load balancer

terrafrom module config example:

module "starmine_api_ecs_task_service_alb_primary" {
  count                = local.lb_count
  source               = "../.."
  load_balancer_name   = local.lb_name
  target_group_name    = local.lb_name
  vpc_id               = var.vpc_id
  subnet_ids           = var.subnet_ids
  internal             = true
  http_port            = "80"
  target_group_port    = "8080"
  health_check_path    = "/research-analytics/starmine/beta1/actuator/health"
  health_check_matcher = "200"
  labels               = merge(local.labels, { component = "alb-enterprise" }, ) //use alb as component name for better naming
}

more info see examples/test

terraform run example

cd examples/test
export TF_VAR_ENV="exampletest"
terraform init
terraform plan

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_lb.default resource
aws_lb_listener.http_forward resource
aws_lb_target_group.default resource
aws_security_group.default resource
aws_security_group_rule.egress resource
aws_security_group_rule.http_ingress resource

Inputs

Name Description Type Default Required
deletion_protection_enabled A boolean flag to enable/disable deletion protection for ALB bool false no
health_check_healthy_threshold The number of consecutive health checks successes required before considering an unhealthy target healthy number 2 no
health_check_interval The duration in seconds in between health checks number 15 no
health_check_matcher The HTTP response codes to indicate a healthy check string "200-399" no
health_check_path The destination for the health check request string "/" no
health_check_port The port to use for the healthcheck string "traffic-port" no
health_check_protocol The protocol to use for the healthcheck. If not specified, same as the traffic protocol string null no
health_check_timeout The amount of time to wait in seconds before failing a health check request number 10 no
health_check_unhealthy_threshold The number of consecutive health check failures required before considering the target unhealthy number 2 no
http_enabled A boolean flag to enable/disable HTTP listener bool true no
http_ingress_cidr_blocks List of CIDR blocks to allow in HTTP security group list(string)
[
"0.0.0.0/0"
]
no
http_port The port for the HTTP listener number 80 no
idle_timeout The time in seconds that the connection is allowed to be idle number 60 no
internal A boolean flag to determine whether the ALB should be internal bool true no
labels Minimum required map of labels(tags) for creating aws resources
object({
prefix = string
stack = string
component = string
env = string
})
n/a yes
load_balancer_name The name for the default load balancer, uses a module label name if left default string "" no
security_group_enabled Enables the security group bool true no
security_group_ids A list of additional security group IDs to allow access to ALB list(string) [] no
subnet_ids A list of subnet IDs to associate with ALB list(string) n/a yes
tags Additional tags map(string) {} no
target_group_name The name for the default target group, uses a module label name if left default string "" no
target_group_port The port for the default target group number 80 no
target_group_protocol The protocol for the default target group HTTP or HTTPS string "HTTP" no
target_group_protocol_version The protocol version for the default target group HTTP1 or HTTP2 or GRPC string "HTTP1" no
target_group_target_type The type (instance, ip or lambda) of targets that can be registered with the target group string "ip" no
vpc_id The ID of the VPC where the Security Group will be created. string n/a yes

Outputs

Name Description
alb_arn The ARN of the ALB
alb_dns_name DNS name of ALB
alb_name The ARN suffix of the ALB
alb_zone_id The ID of the zone which ALB is provisioned
default_target_group_arn The default target group ARN
http_listener_arn The ARN of the HTTP forwarding listener
security_group_id The security group ID of the ALB

aws-alb's People

Contributors

mbelousov7 avatar

Watchers

 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.