2
2
# Terraform module to provide consistent naming
3
3
#
4
4
# TODO:
5
- # Add attributes to name if not empty
6
- # Refactor to use local and output the locals. Test - test - test
7
- # Change where replace is done. Move to earlier in process
5
+ # Change where replace is done. Move to earlier in process. On initial `name`?
8
6
# Create tags_asg list from tags map. If possible
9
7
# New input tags_asg -> tags_asg with standard tags added
10
8
@@ -50,10 +48,6 @@ locals {
50
48
)
51
49
: local . id } "
52
50
53
- # tags_asg list of maps
54
- # map("key", "interpolation1", "value", "value3", "propagate_at_launch", true),
55
- # keys, values, map, merge, matchkeys, transpose
56
-
57
51
# TODO: only add Organization if not ""
58
52
tags = " ${ merge (
59
53
var. tags ,
@@ -64,4 +58,19 @@ locals {
64
58
" Terraform" , " true"
65
59
)
66
60
)} "
61
+ /*
62
+ tags_asg = ["${ concat(
63
+ list(
64
+ map("key", "Name",
65
+ "value", var.namespaced ? format("%s-%s", var.environment, var.name)
66
+ : format("%s", var.name), "propagate_at_launch", true),
67
+ map("key", "Cluster",
68
+ "value", var.namespaced ? format("%s-%s", var.environment, var.name)
69
+ : format("%s", var.name), "propagate_at_launch", true),
70
+ map("key", "Environment", "value", var.environment, "propagate_at_launch", true),
71
+ map("key", "Terraform", "value", "true", "propagate_at_launch", true)
72
+ ),
73
+ var.tags_asg)
74
+ }"]
75
+ */
67
76
}
0 commit comments