Skip to content

Commit 9218961

Browse files
committed
remove the null_data_source (cattle-ops#332)
1 parent a19eb28 commit 9218961

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ resource "aws_autoscaling_group" "gitlab_runner_instance" {
159159
health_check_grace_period = 0
160160
launch_configuration = aws_launch_configuration.gitlab_runner_instance.name
161161
enabled_metrics = var.metrics_autoscaling
162-
tags = data.null_data_source.agent_tags.*.outputs
162+
tags = [for key, value in local.agent_tags : tomap({ "key" : key, "value" : value, "propagate_at_launch" : true })]
163163
}
164164

165165
resource "aws_autoscaling_schedule" "scale_in" {

tags.tf

-20
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,3 @@ locals {
2828
for key in keys(var.runner_tags) : [key, lookup(var.runner_tags, key)]
2929
]))
3030
}
31-
32-
data "null_data_source" "tags" {
33-
count = length(local.tags)
34-
35-
inputs = {
36-
key = element(keys(local.tags), count.index)
37-
value = element(values(local.tags), count.index)
38-
propagate_at_launch = "true"
39-
}
40-
}
41-
42-
data "null_data_source" "agent_tags" {
43-
count = length(local.agent_tags)
44-
45-
inputs = {
46-
key = element(keys(local.agent_tags), count.index)
47-
value = element(values(local.agent_tags), count.index)
48-
propagate_at_launch = "true"
49-
}
50-
}

0 commit comments

Comments
 (0)