@@ -40,73 +40,73 @@ output "subnets" {
4040
4141output "db_subnet_group_id" {
4242 description = " The ID of the RDS Subnet Group."
43- value = element ( concat ( aws_db_subnet_group. this . * . id , [ " " ]), 0 )
43+ value = try ( aws_db_subnet_group. this . * . id [ 0 ], null )
4444}
4545
4646output "db_subnet_group_arn" {
4747 description = " The ARN of the RDS Subnet Group."
48- value = element ( concat ( aws_db_subnet_group. this . * . arn , [ " " ]), 0 )
48+ value = try ( aws_db_subnet_group. this . * . arn [ 0 ], null )
4949}
5050
5151output "cache_subnet_group_id" {
5252 description = " The ID of the Elasticache Subnet Group."
53- value = element ( concat ( aws_elasticache_subnet_group. this . * . id , [ " " ]), 0 )
53+ value = try ( aws_elasticache_subnet_group. this . * . id [ 0 ], null )
5454}
5555
5656# INFO: Not support arn output
5757# output "cache_subnet_group_arn" {
5858# description = "The ARN of the Elasticache Subnet Group."
59- # value = element(concat( aws_elasticache_subnet_group.this.*.arn, [""]), 0 )
59+ # value = try( aws_elasticache_subnet_group.this.*.arn[0], null )
6060# }
6161
6262output "redshift_subnet_group_id" {
6363 description = " The ID of the Redshift Subnet Group."
64- value = element ( concat ( aws_redshift_subnet_group. this . * . id , [ " " ]), 0 )
64+ value = try ( aws_redshift_subnet_group. this . * . id [ 0 ], null )
6565}
6666
6767output "redshift_subnet_group_arn" {
6868 description = " The ARN of the Redshift Subnet Group."
69- value = element ( concat ( aws_redshift_subnet_group. this . * . arn , [ " " ]), 0 )
69+ value = try ( aws_redshift_subnet_group. this . * . arn [ 0 ], null )
7070}
7171
7272output "neptune_subnet_group_id" {
7373 description = " The ID of the Neptune DB Subnet Group."
74- value = element ( concat ( aws_neptune_subnet_group. this . * . id , [ " " ]), 0 )
74+ value = try ( aws_neptune_subnet_group. this . * . id [ 0 ], null )
7575}
7676
7777output "neptune_subnet_group_arn" {
7878 description = " The ARN of the Neptune Subnet Group."
79- value = element ( concat ( aws_neptune_subnet_group. this . * . arn , [ " " ]), 0 )
79+ value = try ( aws_neptune_subnet_group. this . * . arn [ 0 ], null )
8080}
8181
8282output "docdb_subnet_group_id" {
8383 description = " The ID of the DocumentDB Subnet Group."
84- value = element ( concat ( aws_docdb_subnet_group. this . * . id , [ " " ]), 0 )
84+ value = try ( aws_docdb_subnet_group. this . * . id [ 0 ], null )
8585}
8686
8787output "docdb_subnet_group_arn" {
8888 description = " The ARN of the DocumentDB Subnet Group."
89- value = element ( concat ( aws_docdb_subnet_group. this . * . arn , [ " " ]), 0 )
89+ value = try ( aws_docdb_subnet_group. this . * . arn [ 0 ], null )
9090}
9191
9292output "dax_subnet_group_id" {
9393 description = " The ID of the DAX Subnet Group."
94- value = element ( concat ( aws_dax_subnet_group. this . * . id , [ " " ]), 0 )
94+ value = try ( aws_dax_subnet_group. this . * . id [ 0 ], null )
9595}
9696
9797# INFO: Not support arn output
9898# output "dax_subnet_group_arn" {
9999# description = "The ARN of the DAX Subnet Group."
100- # value = element(concat( aws_dax_subnet_group.this.*.arn, [""]), 0 )
100+ # value = try( aws_dax_subnet_group.this.*.arn[0], null )
101101# }
102102
103103output "dms_replication_subnet_group_id" {
104104 description = " The ID of the DMS Replication Subnet Group."
105- value = element ( concat ( aws_dms_replication_subnet_group. this . * . id , [ " " ]), 0 )
105+ value = try ( aws_dms_replication_subnet_group. this . * . id [ 0 ], null )
106106}
107107
108108# INFO: Not support arn output
109109# output "dms_replication_subnet_group_arn" {
110110# description = "The ARN of the DMS Replication Subnet Group."
111- # value = element(concat( aws_dms_replication_subnet_group.this.*.arn, [""]), 0 )
111+ # value = try( aws_dms_replication_subnet_group.this.*.arn[0], null )
112112# }
0 commit comments