GithubHelp home page GithubHelp logo

isabella232 / terraform-aws-alb Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 90 KB

A Terraform module to create an AWS Application Load Balancer (ALB) and associated resources.

Home Page: https://registry.terraform.io/modules/terraform-aws-modules/alb/aws

License: MIT License

Ruby 14.76% Shell 1.20% HCL 84.04%

terraform-aws-alb's Introduction

terraform-aws-alb

A Terraform module containing common configurations for an AWS Application Load Balancer (ALB) running over HTTP/HTTPS. Available through the terraform registry.

Branch Build status
master build Status

Assumptions

  • You want to create a set of resources for the ALB: namely an associated target group and listener.
  • You've created a Virtual Private Cloud (VPC) + subnets where you intend to put this ALB.
  • You have one or more security groups to attach to the ALB.
  • You want to configure a listener for HTTPS/HTTP.
  • You've uploaded an SSL certificate to AWS IAM if using HTTPS.

The module supports both (mutually exclusive):

  • Internal IP ALBs
  • External IP ALBs

It's recommended you use this module with terraform-aws-vpc, terraform-aws-security-group, and terraform-aws-autoscaling.

Why ALB instead of ELB

The use-case presented here appears almost identical to how one would use an ELB but we inherit a few bonuses by moving to ALB. Those are best outlined in AWS's documentation. For an example of using ALB with ECS look no further than the hashicorp example.

Resources, inputs, outputs

Resources, inputs, and outputs documented in the terraform registry.

Usage example

A full example leveraging other community modules is contained in the examples/test_fixtures directory. Here's the gist of using it via the Terraform registry:

module "alb" {
  source                        = "terraform-aws-modules/alb/aws"
  alb_name                      = "my-alb"
  alb_protocols                 = ["HTTPS"]
  alb_security_groups           = ["sg-edcd9784", "sg-edcd9785"]
  certificate_arn               = "arn:aws:iam::123456789012:server-certificate/test_cert-123456789012"
  create_log_bucket             = true
  enable_logging                = true
  health_check_path             = "/"
  log_bucket_name               = "logs-us-east-2-123456789012"
  log_location_prefix           = "my-alb-logs"
  subnets                       = ["subnet-abcde012", "subnet-bcde012a"]
  tags                          = "${map("Environment", "test")}"
  vpc_id                        = "vpc-abcde012"
}

Testing

This module has been packaged with awspec tests through test kitchen. To run them:

  1. Install rvm and the ruby version specified in the Gemfile.
  2. Install bundler and the gems from our Gemfile:
gem install bundler && bundle install
  1. Ensure your AWS environment is configured (i.e. credentials and region) for test and set TF_VAR_region to a valid AWS region (e.g. export TF_VAR_region=${AWS_REGION}).
  2. Test using kitchen test from the root of the repo.

Contributing

Report issues/questions/feature requests on in the Issues section.

Pull requests are welcome! Ideally create a feature branch and issue for every individual change made. These are the steps:

  1. Fork the repo to a personal space or org.
  2. Create your feature branch from master (git checkout -b my-new-feature).
  3. Commit your awesome changes (git commit -am 'Added some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request and tell us about your changes.

IAM Permissions

Testing and using this repo requires a minimum set of IAM permissions. Test permissions are listed in the test_fixtures README.

Change log

The changelog captures all important release notes.

Authors

Created and maintained by Brandon O'Connor - [email protected]. Many thanks to the contributers listed here!

License

MIT Licensed. See LICENSE for full details.

terraform-aws-alb's People

Contributors

brandonjbjelland avatar antonbabenko avatar acharp avatar mbolek avatar angstwad avatar tpoindessous avatar alexjurkiewicz avatar egarbi avatar glennbech avatar zxjinn avatar ndench avatar mksm avatar tehmaspc avatar angusfz avatar proj4spes avatar

Forkers

asmtal

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.