diff --git a/main.tf b/main.tf index cf6985a1c..bb3e32f60 100644 --- a/main.tf +++ b/main.tf @@ -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 } diff --git a/modules/key-pair/versions.tf b/modules/key-pair/versions.tf index 88858f37a..39574535a 100644 --- a/modules/key-pair/versions.tf +++ b/modules/key-pair/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = "~> 0.12" + required_version = ">= 0.12" required_providers { aws = ">= 2.46" local = ">= 1.4" diff --git a/tags.tf b/tags.tf index a49a0c0f6..e67fa45a8 100644 --- a/tags.tf +++ b/tags.tf @@ -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" - } -}