File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ resource "aws_db_proxy_default_target_group" "main" {
133133 for_each = var. connection_pool_config
134134
135135 content {
136-
136+
137137 connection_borrow_timeout = lookup (connection_pool_config. value , " connection_borrow_timeout" , null )
138138 init_query = lookup (connection_pool_config. value , " init_query" , null )
139139 max_connections_percent = lookup (connection_pool_config. value , " max_connections_percent" , null )
@@ -145,8 +145,8 @@ resource "aws_db_proxy_default_target_group" "main" {
145145resource "aws_db_proxy_target" "main" {
146146 count = var. create ? 1 : 0
147147
148- db_instance_identifier = var. db_instance_identifier
149- db_cluster_identifier = var. db_cluster_identifier
148+ db_instance_identifier = length ( var. db_instance_identifier ) > 0 ? var . db_instance_identifier : 0
149+ db_cluster_identifier = length ( var. db_cluster_identifier ) > 0 ? var . db_cluster_identifier : 0
150150 db_proxy_name = aws_db_proxy. main . 0 . name
151151 target_group_name = aws_db_proxy_default_target_group. main . 0 . name
152152}
You can’t perform that action at this time.
0 commit comments