Skip to content

Commit cbc9501

Browse files
author
Steven Nemetz
committed
Remove all ASG tagging references. Moved to ASG module
1 parent 45c884f commit cbc9501

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

main.tf

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
# Create tags_asg list from tags map. If possible
77
# New input tags_asg -> tags_asg with standard tags added
88

9-
module "autoscaling_group" {
10-
source = "devops-workflow/boolean/local"
11-
version = "0.1.1"
12-
value = "${var.autoscaling_group}"
13-
}
14-
159
module "namespace-env" {
1610
source = "devops-workflow/boolean/local"
1711
version = "0.1.1"
@@ -73,52 +67,4 @@ locals {
7367
"Terraform", "true"
7468
)
7569
)}"
76-
77-
/*
78-
tags_asg = ["${ concat(
79-
list(
80-
map("key", "Name",
81-
"value", var.namespaced ? format("%s-%s", var.environment, var.name)
82-
: format("%s", var.name), "propagate_at_launch", true),
83-
map("key", "Cluster",
84-
"value", var.namespaced ? format("%s-%s", var.environment, var.name)
85-
: format("%s", var.name), "propagate_at_launch", true),
86-
map("key", "Environment", "value", var.environment, "propagate_at_launch", true),
87-
map("key", "Terraform", "value", "true", "propagate_at_launch", true)
88-
),
89-
var.tags_asg)
90-
}"]
91-
*/
92-
}
93-
94-
/* Try template_file, it supports count
95-
Can only assign a single value (NOT maps or lists)
96-
data "template_file" "asg_tags" {
97-
count = "${var.autoscaling_group ? length(keys(local.tags)) : 0}"
98-
template = "${map("key", element(keys(local.tags),count.index), "value", element(values(local.tags),count.index), "propagate_at_launch", true)}"
9970
}
100-
#"${data.template_file.data_id.*.rendered}"
101-
/**/
102-
103-
104-
/* Could use null_resource to create? Would need enable/disable so only done when needed
105-
Can only assign strings (NOT maps or lists)
106-
resource "null_resource" "asg_tags" {
107-
count = "${var.autoscaling_group ? length(keys(local.tags)) : 0}"
108-
triggers = {
109-
asg_tag = "${map("key", element(keys(local.tags),count.index), "value", element(values(local.tags),count.index), "propagate_at_launch", true)}"
110-
}
111-
lifecycle {
112-
create_before_destroy = true
113-
}
114-
}
115-
*/
116-
117-
118-
/* locals doesn't currently support count
119-
locals {
120-
count = "${length(keys(local.tags))}"
121-
tag_asg = "${map("key", element(keys(local.tags),count.index), "value", element(values(local.tags),count.index), "propagate_at_launch", true)}"
122-
}
123-
*/
124-

variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ variable "attributes" {
44
default = []
55
}
66

7-
variable "autoscaling_group" {
8-
description = "DOES NOTHING YET. If true, generate ASG tags map resource"
9-
default = false
10-
}
11-
127
variable "component" {
138
description = "TAG: Underlying, dedicated piece of service (Cache, DB, ...)"
149
type = "string"

0 commit comments

Comments
 (0)