Skip to content

Commit 6a240c9

Browse files
MichenuxLaurent Michenaudnpalm
authored
fix: replace deprecated null_data_source with locals (#336)
* fix: replace deprecated null_data_source with locals * fix: indentation * fix: indentation Co-authored-by: Laurent Michenaud <[email protected]> Co-authored-by: Niek Palm <[email protected]>
1 parent c81f221 commit 6a240c9

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Module directory
55
.terraform/
6+
.terraform.lock.hcl
67

78
# keys
89
*id_rsa*

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ resource "aws_autoscaling_group" "gitlab_runner_instance" {
164164
health_check_grace_period = 0
165165
launch_configuration = aws_launch_configuration.gitlab_runner_instance.name
166166
enabled_metrics = var.metrics_autoscaling
167-
tags = [for key, value in local.agent_tags : tomap({ "key" : key, "value" : value, "propagate_at_launch" : true })]
167+
tags = local.agent_tags_propagated
168168

169169
timeouts {
170170
delete = var.asg_delete_timeout

tags.tf

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ locals {
1919
var.tags,
2020
var.agent_tags
2121
)
22+
agent_tags_propagated = [for tag_key, tag_value in local.agent_tags : { key = tag_key, value = tag_value, propagate_at_launch = true }]
2223

2324
tags_string = join(",", flatten([
2425
for key in keys(local.tags) : [key, lookup(local.tags, key)]

0 commit comments

Comments
 (0)