-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-mesh.tf
43 lines (38 loc) · 1.05 KB
/
app-mesh.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
resource "aws_appmesh_virtual_node" "virtual_node" {
count = local.create_virtual_node ? 1 : 0
name = var.virtual_node
mesh_name = var.mesh_name
spec {
listener {
port_mapping {
port = var.container_port
protocol = var.virtual_node_protocol
}
health_check {
protocol = var.virtual_node_protocol
path = local.healthcheck_path
healthy_threshold = var.service_healthcheck_healthy_threshold
unhealthy_threshold = var.service_healthcheck_unhealthy_threshold
interval_millis = var.service_healthcheck_interval
timeout_millis = var.service_healthcheck_timeout
}
}
service_discovery {
aws_cloud_map {
service_name = aws_service_discovery_service.service[0].name
namespace_name = local.namespace
}
}
logging {
access_log {
file {
path = "/dev/stdout"
}
}
}
}
tags = merge(
local.tags,
{ Name = "${local.name} Virtual Node" },
)
}