Skip to content

Commit

Permalink
fix: replace deprecated null_data_source with locals (cattle-ops#336)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jul 8, 2021
1 parent c81f221 commit 6a240c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Module directory
.terraform/
.terraform.lock.hcl

# keys
*id_rsa*
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ 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 = [for key, value in local.agent_tags : tomap({ "key" : key, "value" : value, "propagate_at_launch" : true })]
tags = local.agent_tags_propagated

timeouts {
delete = var.asg_delete_timeout
Expand Down
1 change: 1 addition & 0 deletions tags.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ locals {
var.tags,
var.agent_tags
)
agent_tags_propagated = [for tag_key, tag_value in local.agent_tags : { key = tag_key, value = tag_value, propagate_at_launch = true }]

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

0 comments on commit 6a240c9

Please sign in to comment.