forked from devops-workflow/terraform-null-labels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
69 lines (56 loc) · 2.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
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
output "attributes" {
description = "Attribute string lowercase"
value = "${local.attr}"
}
output "environment" {
description = "Environment name lowercase"
value = "${local.env}"
}
output "id" {
description = "Fully formatted name ID"
value = "${compact(concat(data.null_data_source.ids.*.outputs.id, list("")))}"
}
output "id_20" {
description = "ID truncated to 20 characters"
value = "${compact(concat(data.null_data_source.ids-trunc.*.outputs.id_20, list("")))}"
}
output "id_32" {
description = "ID truncated to 32 characters"
value = "${compact(concat(data.null_data_source.ids-trunc.*.outputs.id_32, list("")))}"
}
output "id_attr_20" {
description = "ID max size 20 characters by truncating `id_org` then appending `attributes`"
value = "${compact(concat(data.null_data_source.ids-trunc-attr.*.outputs.id_attr_20, list("")))}"
}
output "id_attr_32" {
description = "ID max size 32 characters by truncating `id_org` then appending `attributes`"
value = "${compact(concat(data.null_data_source.ids-trunc-attr.*.outputs.id_attr_32, list("")))}"
}
output "id_env" {
description = "If env namespace enabled [env]-[name] else [name]"
value = "${compact(concat(data.null_data_source.env.*.outputs.id, list("")))}"
}
output "id_org" {
description = "If org namespace enabled [org]-[id_env] else [id_env]"
value = "${compact(concat(data.null_data_source.org.*.outputs.id, list("")))}"
}
output "name" {
description = "Name lowercase"
value = "${compact(concat(data.null_data_source.names.*.outputs.id, list("")))}"
}
output "organization" {
description = "Organization name lowercase"
value = "${local.org}"
}
output "tags" {
value = "${data.null_data_source.tags_list.*.outputs}"
}
//debugging
output "org_attr_20" {
description = "Internal debugging. DO NOT USE"
value = "${compact(concat(data.null_data_source.ids-trunc.*.outputs.org_attr_20, list("")))}"
}
output "org_attr_32" {
description = "Internal debugging. DO NOT USE"
value = "${compact(concat(data.null_data_source.ids-trunc.*.outputs.org_attr_32, list("")))}"
}