Skip to content

Commit 2ade7eb

Browse files
dkujig-awmalik
andauthored
fix: add dns_name to output in postgresql module (#544)
Co-authored-by: Awais Malik <[email protected]>
1 parent 11ad0d4 commit 2ade7eb

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

examples/postgresql-psc/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ terraform destroy
3030

3131
| Name | Description |
3232
|------|-------------|
33+
| dns\_name | n/a |
3334
| name | The name for Cloud SQL instance |
3435
| project\_id | n/a |
3536

examples/postgresql-psc/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ output "name" {
2222
description = "The name for Cloud SQL instance"
2323
value = module.pg.instance_name
2424
}
25+
26+
output "dns_name" {
27+
value = module.pg.dns_name
28+
}

modules/postgresql/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq
6767
| Name | Description |
6868
|------|-------------|
6969
| additional\_users | List of maps of additional users and passwords |
70+
| dns\_name | DNS name of the instance endpoint |
7071
| generated\_user\_password | The auto generated default user password if not input password was provided |
7172
| iam\_users | The list of the IAM users with access to the CloudSQL instance |
7273
| instance\_connection\_name | The connection name of the master instance to be used in connection strings |

modules/postgresql/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,8 @@ output "instances" {
136136
description = "A list of all `google_sql_database_instance` resources we've created"
137137
sensitive = true
138138
}
139+
140+
output "dns_name" {
141+
value = google_sql_database_instance.default.dns_name
142+
description = "DNS name of the instance endpoint"
143+
}

0 commit comments

Comments
 (0)