Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add dns_name to output in postgresql module #544

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}