Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Commit 257a522

Browse files
committed
fix error when no db subnets
1 parent 0877c18 commit 257a522

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

out.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ output "database_subnets_ids" {
2424
}
2525

2626
output "aws_db_subnet_group_name" {
27-
value = aws_db_subnet_group.db_subnet_group[0].name
27+
value = length(var.database_subnets) > 0 ? aws_db_subnet_group.db_subnet_group[0].name : null
2828
description = "VPC database subnet group name"
2929
}

0 commit comments

Comments
 (0)