-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcapabilities.tf
103 lines (93 loc) · 2.87 KB
/
capabilities.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// This file is replaced by code-generation using 'capabilities.tf.tmpl'
// This file helps app module creators define a contract for what types of capability outputs are supported.
locals {
cap_modules = [
{
id = 0
namespace = ""
env_prefix = ""
outputs = {}
}
]
cap_env_vars = {}
cap_secrets = {}
capabilities = {
env = [
{
name = ""
value = ""
}
]
secrets = [
{
name = ""
value = ""
}
]
// private_urls follows a wonky syntax so that we can send all capability outputs into the merge module
// Terraform requires that all members be of type list(map(any))
// They will be flattened into list(string) when we output from this module
private_urls = [
{
url = ""
}
]
// public_urls follows a wonky syntax so that we can send all capability outputs into the merge module
// Terraform requires that all members be of type list(map(any))
// They will be flattened into list(string) when we output from this module
public_urls = [
{
url = ""
}
]
log_configurations = [
{
logDriver = "awslogs"
options = {
"awslogs-region" = data.aws_region.this.name
"awslogs-group" = module.logs.name
"awslogs-stream-prefix" = local.block_name
}
}
]
// capabilities can attach mount points to pull/push data from/to the main container
// The name of each mount point will be added to the task as a volume, then mounted in the main container
mount_points = [
{
name = "volume-name"
path = "/path/on/main/disk"
}
]
// resource_requirements enables the usage of GPU cores in a container
resource_requirements = [
{
type = "GPU" // GPU|InferenceAccelerator
value = "1" // This is a string and represents the number of cores for a GPU
}
]
// sidecars allow capabilities to attach additional containers to the service
sidecars = [
{
name = ""
image = ""
essential = false
portMappings = [{ protocol = "tcp", containerPort = 0, hostPort = 0 }]
environment = [{ name = "", value = "" }]
secrets = [{ name = "", valueFrom = "" }]
mountPoints = [{ sourceVolume = "", containerPath = "" }]
volumesFrom = [{ sourceContainer = "" }]
dependsOn = [{ containerName = "", condition = "" }]
}
]
// events allow capabilities to attach event targets
// The app module expects the capability to create the event rule and role and export it
// The app module will use information about the app, cluster, and network to create event targets
events = [
{
rule_name = ""
role_arn = ""
input = "{}"
}
]
}
}