Skip to content

Commit

Permalink
fix(terraform-zscc-asg-aws): propagate default tags to auto scaling g…
Browse files Browse the repository at this point in the history
…roup
  • Loading branch information
ysimiandcossin committed Dec 4, 2024
1 parent 601555e commit 40a01f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/terraform-zscc-asg-aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ data "aws_kms_alias" "current_kms_arn" {
name = coalesce(var.byo_kms_key_alias, data.aws_ebs_default_kms_key.current_kms_key[0].key_arn)
}

################################################################################
# Retrieve the default tags from provider
################################################################################
data "aws_default_tags" "current" {}


################################################################################
# Create launch template for Cloud Connector autoscaling group instance creation.
Expand Down Expand Up @@ -180,7 +185,7 @@ resource "aws_autoscaling_group" "cc_asg" {
}

dynamic "tag" {
for_each = var.global_tags
for_each = merge(var.global_tags, data.aws_default_tags.current.tags)
content {
key = tag.key
value = tag.value
Expand Down

0 comments on commit 40a01f4

Please sign in to comment.