Skip to content

Commit

Permalink
fix: Remove deprecarted null_data_source (#332) (#334)
Browse files Browse the repository at this point in the history
* remove the null_data_source (#332)

* Allow newer Terraform versions

Co-authored-by: kayma <[email protected]>
  • Loading branch information
kayman-mk and kayman-mk authored Jul 8, 2021
1 parent b42712f commit b3ab3f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ resource "aws_autoscaling_group" "gitlab_runner_instance" {
health_check_grace_period = 0
launch_configuration = aws_launch_configuration.gitlab_runner_instance.name
enabled_metrics = var.metrics_autoscaling
tags = data.null_data_source.agent_tags.*.outputs
tags = [for key, value in local.agent_tags : tomap({ "key" : key, "value" : value, "propagate_at_launch" : true })]

timeouts {
delete = var.asg_delete_timeout
}
Expand Down
20 changes: 0 additions & 20 deletions tags.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,3 @@ locals {
for key in keys(var.runner_tags) : [key, lookup(var.runner_tags, key)]
]))
}

data "null_data_source" "tags" {
count = length(local.tags)

inputs = {
key = element(keys(local.tags), count.index)
value = element(values(local.tags), count.index)
propagate_at_launch = "true"
}
}

data "null_data_source" "agent_tags" {
count = length(local.agent_tags)

inputs = {
key = element(keys(local.agent_tags), count.index)
value = element(values(local.agent_tags), count.index)
propagate_at_launch = "true"
}
}

0 comments on commit b3ab3f6

Please sign in to comment.