-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetrics.tf
More file actions
27 lines (23 loc) · 877 Bytes
/
metrics.tf
File metadata and controls
27 lines (23 loc) · 877 Bytes
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
locals {
metrics_mappings = concat(local.base_metrics, local.cap_metrics)
cap_metrics_defs = lookup(local.capabilities, "metrics", [])
cap_metrics = [
for m in local.cap_metrics_defs : {
name = m.name
type = m.type
unit = m.unit
mappings = {
for metric_id, mapping in jsondecode(lookup(m, "mappings", "{}")) : metric_id => {
account_id = mapping.account_id
dimensions = mapping.dimensions
stat = lookup(mapping, "stat", null)
namespace = lookup(mapping, "namespace", null)
metric_name = lookup(mapping, "metric_name", null)
expression = lookup(mapping, "expression", null)
hide_from_results = lookup(mapping, "hide_from_results", null)
}
}
}
]
base_metrics = []
}