File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ Retrieve it after apply with:
44
44
terraform output -raw db_master_password
45
45
```
46
46
47
- For a ready-to-use PostgreSQL connection URI (includes the password):
47
+ For a ready-to-use PostgreSQL connection URI (includes the password; username, password, and database name are URL-encoded ):
48
48
49
49
```
50
50
terraform output -raw db_connection_uri
Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ output "db_connection_uri" {
38
38
description = " PostgreSQL connection URI including credentials (sensitive)"
39
39
value = format (
40
40
" postgresql://%s:%s@%s:%d/%s" ,
41
- var. username ,
42
- random_password. master . result ,
41
+ urlencode ( var. username ) ,
42
+ urlencode ( random_password. master . result ) ,
43
43
aws_db_instance. this . address ,
44
44
aws_db_instance. this . port ,
45
- var. database_name ,
45
+ urlencode ( var. database_name ) ,
46
46
)
47
47
sensitive = true
48
48
}
You can’t perform that action at this time.
0 commit comments