Repository navigation
Expand file tree
/
Copy pathcapabilities.tf
More file actions
145 lines (129 loc) · 3.63 KB
/
Copy pathcapabilities.tf
File metadata and controls
145 lines (129 loc) · 3.63 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
134
135
136
137
138
139
140
141
142
143
144
145
// 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 = {}
meta = {
subcategory = ""
platform = ""
subplatform = ""
outputNames = []
}
}
]
// cap_env_prefixes is a map indexed by tfId which points to the env_prefix in local.cap_modules
cap_env_prefixes = tomap({
x = ""
})
// cap_prefixes is a map indexed by capability name which points to the env_prefix in local.cap_modules
cap_prefixes = tomap({
x = ""
})
capabilities = {
env = [
{
cap_tf_id = "x"
capability = "x"
name = "EXAMPLE_ENV"
value = ""
}
]
secrets = [
{
cap_tf_id = "x"
capability = "x"
name = "EXAMPLE_SECRET"
value = sensitive("")
}
]
// 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 = [
{
cap_tf_id = "x"
capability = "x"
url = "http://example"
}
]
// 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 = [
{
cap_tf_id = "x"
capability = "x"
url = "https://example.com"
}
]
log_configurations = [
{
cap_tf_id = "x"
capability = "x"
logDriver = "awslogs"
options = {
"awslogs-region" = data.aws_region.this.region
"awslogs-group" = module.scaffold.log_group.name
"awslogs-stream-prefix" = local.block_name
}
}
]
permissions = [
{
cap_tf_id = "x"
capability = "x"
// required
sid_prefix = ""
action = "lambda:InvokeFunction" // lambda:InvokeFunction | lambda:GetFunction
principal = ""
// optional
source_arn = ""
source_account = ""
event_source_token = ""
qualifier = ""
revision_id = ""
principal_org_id = ""
function_url_auth_type = ""
}
]
event_sources = [
{
cap_tf_id = "x"
capability = "x"
// required
name = "" // used to uniquely identify the event source
source_arn = ""
// optional
enabled = true
batch_size = null // number
starting_position = null // string
topic = [] // list(string)
}
]
dead_letter_queues = [
{
cap_tf_id = "x"
capability = "x"
queue_arn = ""
}
]
// 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 = [
{
cap_tf_id = "x"
capability = "x"
name = ""
type = "usage|usage-percent|duration|generic"
unit = ""
mappings = "{}"
}
]
}
}