forked from exiadbq/terraform-aws-ssm-parameter-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
61 lines (55 loc) · 1.39 KB
/
outputs.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
# Splitting and joining, and then compacting a list to get a normalised list
locals {
name_list = compact(
concat(
split(
var.split_delimiter,
join(var.split_delimiter, aws_ssm_parameter.default.*.name)
),
split(
var.split_delimiter,
join(var.split_delimiter, data.aws_ssm_parameter.read.*.name)
)
)
)
value_list = compact(
concat(
split(
var.split_delimiter,
join(var.split_delimiter, aws_ssm_parameter.default.*.value)
),
split(
var.split_delimiter,
join(var.split_delimiter, data.aws_ssm_parameter.read.*.value)
)
)
)
arn_list = compact(
concat(
split(
var.split_delimiter,
join(var.split_delimiter, aws_ssm_parameter.default.*.arn)
),
split(
var.split_delimiter,
join(var.split_delimiter, data.aws_ssm_parameter.read.*.arn)
)
)
)
}
output "names" {
value = local.name_list
description = "A list of all of the parameter names"
}
output "values" {
description = "A list of all of the parameter values"
value = local.value_list
}
output "map" {
description = "A map of the names and values created"
value = zipmap(local.name_list, local.value_list)
}
output "arn_map" {
description = "A map of the names and ARNs created"
value = zipmap(local.name_list, local.arn_list)
}