-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
78 lines (59 loc) · 1.37 KB
/
main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
provider "aws" {
region = "us-east-1"
}
data "aws_vpc" "default" {
default = true
}
data "aws_subnet" "default" {
for_each = toset(["use1-az1", "use1-az2"])
availability_zone_id = each.key
default_for_az = true
}
###################################################
# IP Target Group
###################################################
module "target_group" {
source = "../../modules/lattice-ip-target-group"
# source = "tedilabs/vpc-connectivity/aws//modules/lattice-ip-target-group"
# version = "~> 0.2.0"
name = "ip-hello"
vpc = data.aws_vpc.default.id
ip_address_type = "IPV4"
port = 80
protocol = "HTTP"
protocol_version = "HTTP1"
## Health Check
health_check = {
enabled = true
port = 80
protocol = "HTTP"
protocol_version = "HTTP1"
path = "/"
success_codes = "200-299"
interval = 30
timeout = 5
healthy_threshold = 5
unhealthy_threshold = 2
}
## Targets
targets = [
{
name = "ip-1"
ip_address = "172.31.10.111"
port = 80
},
{
name = "ip-2"
ip_address = "172.31.10.112"
port = 80
},
{
name = "ip-3"
ip_address = "172.31.10.113"
port = 80
},
]
tags = {
"project" = "terraform-aws-vpc-connectivity-examples"
}
}