Skip to content

Commit

Permalink
fix: add dns_name to output in postgresql module (#544)
Browse files Browse the repository at this point in the history
Co-authored-by: Awais Malik <awmalik@google.com>
  • Loading branch information
dkuji and g-awmalik committed Dec 5, 2023
1 parent 11ad0d4 commit 2ade7eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/postgresql-psc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ terraform destroy

| Name | Description |
|------|-------------|
| dns\_name | n/a |
| name | The name for Cloud SQL instance |
| project\_id | n/a |

Expand Down
4 changes: 4 additions & 0 deletions examples/postgresql-psc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ output "name" {
description = "The name for Cloud SQL instance"
value = module.pg.instance_name
}

output "dns_name" {
value = module.pg.dns_name
}
1 change: 1 addition & 0 deletions modules/postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq
| Name | Description |
|------|-------------|
| additional\_users | List of maps of additional users and passwords |
| dns\_name | DNS name of the instance endpoint |
| generated\_user\_password | The auto generated default user password if not input password was provided |
| iam\_users | The list of the IAM users with access to the CloudSQL instance |
| instance\_connection\_name | The connection name of the master instance to be used in connection strings |
Expand Down
5 changes: 5 additions & 0 deletions modules/postgresql/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,8 @@ output "instances" {
description = "A list of all `google_sql_database_instance` resources we've created"
sensitive = true
}

output "dns_name" {
value = google_sql_database_instance.default.dns_name
description = "DNS name of the instance endpoint"
}

0 comments on commit 2ade7eb

Please sign in to comment.