@@ -40,73 +40,73 @@ output "subnets" {
40
40
41
41
output "db_subnet_group_id" {
42
42
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 )
44
44
}
45
45
46
46
output "db_subnet_group_arn" {
47
47
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 )
49
49
}
50
50
51
51
output "cache_subnet_group_id" {
52
52
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 )
54
54
}
55
55
56
56
# INFO: Not support arn output
57
57
# output "cache_subnet_group_arn" {
58
58
# 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 )
60
60
# }
61
61
62
62
output "redshift_subnet_group_id" {
63
63
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 )
65
65
}
66
66
67
67
output "redshift_subnet_group_arn" {
68
68
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 )
70
70
}
71
71
72
72
output "neptune_subnet_group_id" {
73
73
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 )
75
75
}
76
76
77
77
output "neptune_subnet_group_arn" {
78
78
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 )
80
80
}
81
81
82
82
output "docdb_subnet_group_id" {
83
83
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 )
85
85
}
86
86
87
87
output "docdb_subnet_group_arn" {
88
88
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 )
90
90
}
91
91
92
92
output "dax_subnet_group_id" {
93
93
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 )
95
95
}
96
96
97
97
# INFO: Not support arn output
98
98
# output "dax_subnet_group_arn" {
99
99
# 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 )
101
101
# }
102
102
103
103
output "dms_replication_subnet_group_id" {
104
104
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 )
106
106
}
107
107
108
108
# INFO: Not support arn output
109
109
# output "dms_replication_subnet_group_arn" {
110
110
# 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 )
112
112
# }
0 commit comments