Skip to content

Commit 731a9b1

Browse files
author
Steven Nemetz
committed
Add more manual test cases
1 parent 6b0ea26 commit 731a9b1

File tree

3 files changed

+304
-60
lines changed

3 files changed

+304
-60
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ module "label" {
4141
tags = "${var.tags}"
4242
}
4343

44+
# TODO: need to support from var both basename and a complete name
45+
# may have 1 log bucket for many apps
4446
module "log_bucket" {
4547
source = "devops-workflow/label/local"
4648
version = "0.1.2"

test/main.tf

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ data "aws_subnet_ids" "private_subnet_ids" {
1919

2020
# TODO: setup at least 3 LB: NLB, ALB w/o logs, ALB w/ logs
2121
# update outputs for all 3
22-
module "lb" {
22+
module "lb-tcp" {
2323
source = "../"
24-
name = "lb-svc"
24+
name = "lb-tcp"
2525
environment = "one"
2626
organization = "wiser"
2727
#attributes = ["role", "policy", "use", ""]
@@ -30,7 +30,7 @@ module "lb" {
3030
#health_check_path = ""
3131
security_groups = ["sg-a5bf1cd8"] # Need at least 1
3232
lb_protocols = ["HTTP","HTTPS"]
33-
#type = "network"
33+
type = "network"
3434
subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
3535
vpc_id = "${data.aws_vpc.vpc.id}"
3636
ports = "3000,4000"
@@ -40,20 +40,51 @@ module "lb" {
4040
lb_http_ports = "80,8080"
4141
lb_https_ports = "443"
4242
lb_tcp_ports = ""
43-
4443
}
45-
46-
/* Example for replacing existing module
47-
module "lb-http-service" {
48-
source = "../"
49-
name = "${var.stack}"
50-
subnets = "${module.aws_env.private_subnet_ids}"
51-
vpc_id = "${module.aws_env.vpc_id}"
52-
security_groups = "${compact(split(",", "${join(",", var.additional_sg_ids)},${module.sg.sg_id}" ))}"
53-
ports = "${join(",", list(var.port), var.additional_ports)}"
54-
type = "${var.lb_type}"
55-
lb_protocols = ["${var.lb_type == "application" ? "HTTP" : "TCP"}"]
56-
health_check_path = "${var.healthcheck_path}"
57-
health_check_protocol = "${var.healthcheck_protocol}"
44+
module "lb-http" {
45+
source = "../"
46+
name = "lb-http"
47+
environment = "one"
48+
organization = "wiser"
49+
#attributes = ["role", "policy", "use", ""]
50+
#tags = "${map("Key", "Value")}"
51+
#enabled = false
52+
#health_check_path = ""
53+
security_groups = ["sg-a5bf1cd8"] # Need at least 1
54+
lb_protocols = ["HTTP"]
55+
#type = "network"
56+
subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
57+
vpc_id = "${data.aws_vpc.vpc.id}"
58+
ports = "3000,4000"
59+
instance_http_ports = "80,8080"
60+
instance_https_ports = ""
61+
instance_tcp_ports = ""
62+
lb_http_ports = "80,8080"
63+
lb_https_ports = ""
64+
lb_tcp_ports = ""
65+
}
66+
module "lb-https" {
67+
source = "../"
68+
name = "lb-https"
69+
environment = "one"
70+
organization = "wiser"
71+
#attributes = ["role", "policy", "use", ""]
72+
#tags = "${map("Key", "Value")}"
73+
#enabled = false
74+
#health_check_path = ""
75+
internal = false # PUBLIC
76+
#security_groups = ["sg-a5bf1cd8"] # Need at least 1
77+
security_groups = ["sg-422c923e"] # PUBLIC -> use whitelist SG
78+
lb_protocols = ["HTTPS"]
79+
#type = "network"
80+
#subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
81+
subnets = "${data.aws_subnet_ids.public_subnet_ids.ids}" # PUBLIC -> use public subnets
82+
vpc_id = "${data.aws_vpc.vpc.id}"
83+
ports = "3000,4000"
84+
instance_http_ports = ""
85+
instance_https_ports = "443,8443"
86+
instance_tcp_ports = ""
87+
lb_http_ports = ""
88+
lb_https_ports = "443,8443"
89+
lb_tcp_ports = ""
5890
}
59-
*/

0 commit comments

Comments
 (0)