-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcapabilities.tf
More file actions
133 lines (119 loc) · 3.69 KB
/
capabilities.tf
File metadata and controls
133 lines (119 loc) · 3.69 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// 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 = [
{
name = ""
tfId = ""
namespace = ""
env_prefix = ""
outputs = {}
}
]
cap_env_vars = {}
cap_secrets = {}
capabilities = {
env = [
{
name = ""
value = ""
}
]
secrets = [
{
name = ""
value = ""
}
]
load_balancers = [
{
port = 80
target_group_arn = ""
}
]
// 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" = local.region
"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 = "{}"
}
]
// ulimits allow capabilities to modify ulimits on the main container
ulimits = [
{
name = "" // "core"|"cpu"|"data"|"fsize"|"locks"|"memlock"|"msgqueue"|"nice"|"nofile"|"nproc"|"rss"|"rtprio"|"rttime"|"sigpending"|"stack"
softLimit = 0 // integer
hardLimit = 0 // integer
}
]
// metrics allows capabilities to attach metrics to the application
// These metrics are displayed on the Application Monitoring page
// See https://docs.nullstone.io/extending/metrics/aws-cloudwatch.html#metrics-mappings
metrics = [
{
name = ""
type = "usage|usage-percent|duration|generic"
unit = ""
mappings = "{}"
}
]
}
}