forked from cloudposse/terraform-aws-ssm-parameter-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
39 lines (33 loc) · 1.12 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
# Splitting and joining, and then compacting a list to get a normalised list
locals {
name_list = compact(concat(keys(local.parameter_write), keys(local.parameter_write_ignore_values), local.parameter_read))
value_list = compact(
concat(
[for p in aws_ssm_parameter.default : p.value], [for p in aws_ssm_parameter.ignore_value_changes : p.value], data.aws_ssm_parameter.read.*.value
)
)
arn_list = compact(
concat(
[for p in aws_ssm_parameter.default : p.arn], [for p in aws_ssm_parameter.ignore_value_changes : p.arn], data.aws_ssm_parameter.read.*.arn
)
)
}
output "names" {
# Names are not sensitive
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
sensitive = true
}
output "map" {
description = "A map of the names and values created"
value = zipmap(local.name_list, local.value_list)
sensitive = true
}
output "arn_map" {
description = "A map of the names and ARNs created"
value = zipmap(local.name_list, local.arn_list)
}