Skip to content

Commit

Permalink
Merge pull request #3 from devops-workflow/master
Browse files Browse the repository at this point in the history
Merge upstream updates
  • Loading branch information
snemetz committed Mar 14, 2018
2 parents 018f128 + fa5327c commit 209f206
Show file tree
Hide file tree
Showing 31 changed files with 909 additions and 552 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Balancer (ALB/NLB). Available through the [terraform registry](https://registry.

| Branch | Build status |
| --- | --- |
| master | [![CircleCI](https://circleci.com/gh/devops-workflow/terraform-aws-alb.svg?style=svg)](https://circleci.com/gh/devops-workflow/terraform-aws-alb) |
| master | [![TravisCI](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb.svg?branch=master)](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb) |
| master | [![CircleCI](https://circleci.com/gh/devops-workflow/terraform-aws-lb.svg?style=svg)](https://circleci.com/gh/devops-workflow/terraform-aws-lb) |
| master (upstream) | [![TravisCI](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb.svg?branch=master)](https://travis-ci.org/terraform-aws-modules/terraform-aws-alb) |

## Assumptions
* You want to create a set of resources for the ALB: namely an associated target group and listener.
Expand Down
1 change: 1 addition & 0 deletions examples/disabled/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Module disabled
41 changes: 41 additions & 0 deletions examples/disabled/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
data "aws_vpc" "vpc" {
tags {
Env = "one"
}
}

# Look up security group
data "aws_subnet_ids" "public_subnet_ids" {
vpc_id = "${data.aws_vpc.vpc.id}"

tags {
Network = "Public"
}
}

data "aws_subnet_ids" "private_subnet_ids" {
vpc_id = "${data.aws_vpc.vpc.id}"

tags {
Network = "Private"
}
}

module "disabled" {
source = "../../"
name = "lb-disabled"
environment = "one"
organization = "wiser"
enabled = false
instance_http_ports = "80,8080"
instance_https_ports = "443"
instance_tcp_ports = ""
lb_http_ports = "80,8080"
lb_https_ports = "443"
lb_protocols = ["HTTP", "HTTPS"]
lb_tcp_ports = ""
ports = "3000,4000"
security_groups = ["sg-bef0a5c2"] # Need at least 1
subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
vpc_id = "${data.aws_vpc.vpc.id}"
}
122 changes: 122 additions & 0 deletions examples/disabled/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
//
// LB attributes
//
output "arn" {
description = "ARN of the LB itself. Useful for debug output, for example when attaching a WAF."
value = "${module.disabled.arn}"
}

output "dns_name" {
description = "The DNS name of the LB presumably to be used with a friendlier CNAME."
value = "${module.disabled.dns_name}"
}

output "id" {
description = "The ID of the LB we created."
value = "${module.disabled.id}"
}

output "zone_id" {
description = "The zone_id of the LB to assist with creating DNS records."
value = "${module.disabled.zone_id}"
}

# arn_suffix
# canonical_hosted_zone_id

//
// LB Listener attributes
//
output "listener_http_arns" {
description = "The ARNs of the HTTP LB Listeners"
value = "${module.disabled.listener_http_arns}"
}

output "listener_http_ids" {
description = "The IDs of the HTTP LB Listeners"
value = "${module.disabled.listener_http_ids}"
}

output "listener_https_arns" {
description = "The ARNs of the HTTPS LB Listeners"
value = "${module.disabled.listener_https_arns}"
}

output "listener_https_ids" {
description = "The IDs of the HTTPS LB Listeners"
value = "${module.disabled.listener_https_ids}"
}

output "listener_tcp_arns" {
description = "The ARNs of the network TCP LB Listeners"
value = "${module.disabled.listener_tcp_arns}"
}

output "listener_tcp_ids" {
description = "The IDs of the network TCP LB Listeners"
value = "${module.disabled.listener_tcp_ids}"
}

output "listener_arns" {
description = "ARNs of all the LB Listeners"
value = "${module.disabled.listener_arns}"
}

output "listener_ids" {
description = "IDs of all the LB Listeners"
value = "${module.disabled.listener_ids}"
}

//
// LB Target Group attributes
//
output "target_group_http_arns" {
description = "ARNs of the HTTP target groups. Useful for passing to your Auto Scaling group module."
value = "${module.disabled.target_group_http_arns}"
}

output "target_group_https_arns" {
description = "ARNs of the HTTPS target groups. Useful for passing to your Auto Scaling group module."
value = "${module.disabled.target_group_https_arns}"
}

output "target_group_tcp_arns" {
description = "ARNs of the TCP target groups. Useful for passing to your Auto Scaling group module."
value = "${module.disabled.target_group_tcp_arns}"
}

output "target_group_arns" {
description = "ARNs of all the target groups. Useful for passing to your Auto Scaling group module."
value = "${module.disabled.target_group_arns}"
}

output "target_group_http_ids" {
description = "IDs of the HTTP target groups"
value = "${module.disabled.target_group_http_ids}"
}

output "target_group_https_ids" {
description = "IDs of the HTTPS target groups"
value = "${module.disabled.target_group_https_ids}"
}

output "target_group_tcp_ids" {
description = "IDs of the TCP target groups"
value = "${module.disabled.target_group_tcp_ids}"
}

output "target_group_ids" {
description = "IDs of all the target groups"
value = "${module.disabled.target_group_ids}"
}

# arn_suffix
# name

//
// Misc
//
output "principal_account_id" {
description = "The AWS-owned account given permissions to write your LB logs to S3."
value = "${module.disabled.principal_account_id}"
}
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions examples/http/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ALB using HTTP
44 changes: 44 additions & 0 deletions examples/http/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
data "aws_vpc" "vpc" {
tags {
Env = "one"
}
}

# Look up security group
data "aws_subnet_ids" "public_subnet_ids" {
vpc_id = "${data.aws_vpc.vpc.id}"

tags {
Network = "Public"
}
}

data "aws_subnet_ids" "private_subnet_ids" {
vpc_id = "${data.aws_vpc.vpc.id}"

tags {
Network = "Private"
}
}

module "lb-http" {
source = "../../"
name = "lb-http"
environment = "one"
organization = "wiser"

#enable_deletion_protection = true
#enable_http2 = false
instance_http_ports = "80,8080"

instance_https_ports = ""
instance_tcp_ports = ""
lb_http_ports = "80,8080"
lb_https_ports = ""
lb_protocols = ["HTTP"]
lb_tcp_ports = ""
ports = "3000,4000"
security_groups = ["sg-bef0a5c2"] # Need at least 1
subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
vpc_id = "${data.aws_vpc.vpc.id}"
}
122 changes: 122 additions & 0 deletions examples/http/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
//
// LB attributes
//
output "arn" {
description = "ARN of the LB itself. Useful for debug output, for example when attaching a WAF."
value = "${module.lb-http.arn}"
}

output "dns_name" {
description = "The DNS name of the LB presumably to be used with a friendlier CNAME."
value = "${module.lb-http.dns_name}"
}

output "id" {
description = "The ID of the LB we created."
value = "${module.lb-http.id}"
}

output "zone_id" {
description = "The zone_id of the LB to assist with creating DNS records."
value = "${module.lb-http.zone_id}"
}

# arn_suffix
# canonical_hosted_zone_id

//
// LB Listener attributes
//
output "listener_http_arns" {
description = "The ARNs of the HTTP LB Listeners"
value = "${module.lb-http.listener_http_arns}"
}

output "listener_http_ids" {
description = "The IDs of the HTTP LB Listeners"
value = "${module.lb-http.listener_http_ids}"
}

output "listener_https_arns" {
description = "The ARNs of the HTTPS LB Listeners"
value = "${module.lb-http.listener_https_arns}"
}

output "listener_https_ids" {
description = "The IDs of the HTTPS LB Listeners"
value = "${module.lb-http.listener_https_ids}"
}

output "listener_tcp_arns" {
description = "The ARNs of the network TCP LB Listeners"
value = "${module.lb-http.listener_tcp_arns}"
}

output "listener_tcp_ids" {
description = "The IDs of the network TCP LB Listeners"
value = "${module.lb-http.listener_tcp_ids}"
}

output "listener_arns" {
description = "ARNs of all the LB Listeners"
value = "${module.lb-http.listener_arns}"
}

output "listener_ids" {
description = "IDs of all the LB Listeners"
value = "${module.lb-http.listener_ids}"
}

//
// LB Target Group attributes
//
output "target_group_http_arns" {
description = "ARNs of the HTTP target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb-http.target_group_http_arns}"
}

output "target_group_https_arns" {
description = "ARNs of the HTTPS target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb-http.target_group_https_arns}"
}

output "target_group_tcp_arns" {
description = "ARNs of the TCP target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb-http.target_group_tcp_arns}"
}

output "target_group_arns" {
description = "ARNs of all the target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb-http.target_group_arns}"
}

output "target_group_http_ids" {
description = "IDs of the HTTP target groups"
value = "${module.lb-http.target_group_http_ids}"
}

output "target_group_https_ids" {
description = "IDs of the HTTPS target groups"
value = "${module.lb-http.target_group_https_ids}"
}

output "target_group_tcp_ids" {
description = "IDs of the TCP target groups"
value = "${module.lb-http.target_group_tcp_ids}"
}

output "target_group_ids" {
description = "IDs of all the target groups"
value = "${module.lb-http.target_group_ids}"
}

# arn_suffix
# name

//
// Misc
//
output "principal_account_id" {
description = "The AWS-owned account given permissions to write your LB logs to S3."
value = "${module.lb-http.principal_account_id}"
}
5 changes: 5 additions & 0 deletions examples/http/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
provider "aws" {
region = "${var.region}"

#version = "1.5"
}
3 changes: 3 additions & 0 deletions examples/http/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variable "region" {
default = "us-west-2"
}
1 change: 1 addition & 0 deletions examples/https/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ALB using HTTPS
Loading

0 comments on commit 209f206

Please sign in to comment.