-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalb.tf
52 lines (45 loc) · 1.05 KB
/
alb.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module "alb" {
source = "terraform-aws-modules/alb/aws"
version = "~> 6.0"
name = "alblib"
load_balancer_type = "application"
vpc_id = module.libvpc.vpc_id
subnets = module.libvpc.public_subnets
security_groups = [module.securitylib.security_group_id]
target_groups = [
{
name_prefix = "p-lib"
backend_protocol = "HTTP"
backend_port = 80
target_type = "instance"
targets = [
{
target_id = module.ec2lib[1].id
port = 80
},
{
target_id = module.ec2lib[1].id
port = 443
}
]
}
]
https_listeners = [
{
port = 443
protocol = "HTTPS"
certificate_arn = "arn:aws:acm:us-west-2:441304528954:certificate/7c40f721-dea0-4b3f-ba93-08b4b14bb451"
target_group_index = 0
}
]
http_tcp_listeners = [
{
port = 80
protocol = "HTTP"
target_group_index = 0
}
]
tags = {
Terraform = "true"
}
}