Skip to content

Commit 0ccf9a9

Browse files
authored
Merge branch 'ryvn-mango:main' into main
2 parents 2278ff3 + d42df82 commit 0ccf9a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Retrieve it after apply with:
4444
terraform output -raw db_master_password
4545
```
4646

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):
4848

4949
```
5050
terraform output -raw db_connection_uri

outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ output "db_connection_uri" {
3838
description = "PostgreSQL connection URI including credentials (sensitive)"
3939
value = format(
4040
"postgresql://%s:%s@%s:%d/%s",
41-
var.username,
42-
random_password.master.result,
41+
urlencode(var.username),
42+
urlencode(random_password.master.result),
4343
aws_db_instance.this.address,
4444
aws_db_instance.this.port,
45-
var.database_name,
45+
urlencode(var.database_name),
4646
)
4747
sensitive = true
4848
}

0 commit comments

Comments
 (0)