File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
locals {
2
- create_random_password = var. create_db_instance && var. create_random_password && var . replicate_source_db == null
3
- password = try ( random_password. master_password [0 ]. result , var. password )
2
+ create_random_password = var. create_db_instance && var. create_random_password
3
+ password = local . create_random_password ? random_password. master_password [0 ]. result : var. password
4
4
5
5
db_subnet_group_name = var. create_db_subnet_group ? module. db_subnet_group . db_subnet_group_id : var. db_subnet_group_name
6
6
parameter_group_name_id = var. create_db_parameter_group ? module. db_parameter_group . db_parameter_group_id : var. parameter_group_name
@@ -10,7 +10,6 @@ locals {
10
10
}
11
11
12
12
resource "random_password" "master_password" {
13
- # We don't need to create a random password for instances that are replicas or restored from a snapshot
14
13
count = local. create_random_password ? 1 : 0
15
14
16
15
length = var. random_password_length
You can’t perform that action at this time.
0 commit comments