Skip to content

Commit 2a3115b

Browse files
authored
Merge pull request #2 from SPHTech-Platform/fix-outputs
Update output if subnet group is not created
2 parents 8a92dac + 72f261f commit 2a3115b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: outputs.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ output "engine_version_actual" {
4040

4141
output "subnet_group_name" {
4242
description = "The Name of the ElastiCache Subnet Group."
43-
value = aws_elasticache_subnet_group.this[0].name
43+
value = try(aws_elasticache_subnet_group.this[0].name, var.subnet_group_name)
4444
}
4545

4646
output "subnet_group_subnet_ids" {
4747
description = "The Subnet IDs of the ElastiCache Subnet Group."
48-
value = aws_elasticache_subnet_group.this[0].subnet_ids
48+
value = try(aws_elasticache_subnet_group.this[0].subnet_ids, var.subnets)
4949
}
5050

5151
output "parameter_group_arn" {

0 commit comments

Comments
 (0)