Skip to content

Commit

Permalink
Update tags variable: add merge to allow var injection
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanDumortier committed Apr 19, 2024
1 parent fbdf6ac commit 75cf4ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,5 @@ variable "tags" {
description = "Tags to add to all created resources"
default = {
"peinser-lz:tf-managed" = "true"
"peinser-lz:env" = var.env
}
}
5 changes: 4 additions & 1 deletion vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@ module "vpc" {
database_route_table_tags = { Name = "${var.env}-rt-database" }

# Generic tags applied to all resources
tags = var.tags
tags = merge(
var.tags,
{ "peinser:lz-env" = var.env }
)
}

0 comments on commit 75cf4ce

Please sign in to comment.