Skip to content

Commit 995217b

Browse files
committed
feat: Add database tags per az
1 parent 33b09ca commit 995217b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ resource "aws_subnet" "database" {
461461
},
462462
var.tags,
463463
var.database_subnet_tags,
464+
lookup(var.database_subnet_tags_per_az, element(var.azs, count.index), {})
464465
)
465466
}
466467

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,12 @@ variable "database_subnet_tags" {
558558
default = {}
559559
}
560560

561+
variable "database_subnet_tags_per_az" {
562+
description = "Additional tags for the database subnets where the primary key is the AZ"
563+
type = map(map(string))
564+
default = {}
565+
}
566+
561567
variable "database_subnet_group_tags" {
562568
description = "Additional tags for the database subnet group"
563569
type = map(string)

0 commit comments

Comments
 (0)