Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Expose Cloud SQL instance IP. (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingao267 authored Feb 18, 2020
1 parent 1c1c1ea commit 1793f0b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ For this module to work, you need the following APIs enabled on the Forseti proj
| forseti-client-vm-ip | Forseti Client VM private IP address |
| forseti-client-vm-name | Forseti Client VM name |
| forseti-cloudsql-connection-name | Forseti CloudSQL Connection String |
| forseti-cloudsql-instance-ip | The IP of the master CloudSQL instance |
| forseti-cloudsql-password | CloudSQL password |
| forseti-cloudsql-user | CloudSQL user |
| forseti-server-git-public-key-openssh | The public OpenSSH key generated to allow the Forseti Server to clone the policy library repository. |
Expand Down
7 changes: 6 additions & 1 deletion modules/cloudsql/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ output "forseti-cloudsql-instance-name" {
value = google_sql_database_instance.master.name
}

output "forseti-cloudsql-instance-ip" {
description = "The IP of the master CloudSQL instance"
value = google_sql_database_instance.master.ip_address.0.ip_address
}

output "forseti-cloudsql-region" {
description = "CloudSQL region"
value = var.cloudsql_region
Expand All @@ -34,7 +39,7 @@ output "forseti-cloudsql-db-name" {
value = var.cloudsql_db_name
}

output "forseti-clodusql-db-port" {
output "forseti-cloudsql-db-port" {
description = "CloudSQL database port"
value = "3306"
}
Expand Down
2 changes: 1 addition & 1 deletion modules/server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ data "template_file" "forseti_server_env" {
vars = {
project_id = var.project_id
cloudsql_db_name = var.cloudsql_module.forseti-cloudsql-db-name
cloudsql_db_port = var.cloudsql_module.forseti-clodusql-db-port
cloudsql_db_port = var.cloudsql_module.forseti-cloudsql-db-port
cloudsql_region = var.cloudsql_module.forseti-cloudsql-region
cloudsql_instance_name = var.cloudsql_module.forseti-cloudsql-instance-name
cloudsql_db_user = var.cloudsql_module.forseti-cloudsql-user
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ output "forseti-client-vm-name" {
value = module.client.forseti-client-vm-name
}

output "forseti-cloudsql-instance-ip" {
description = "The IP of the master CloudSQL instance"
value = module.cloudsql.forseti-cloudsql-instance-ip
}

output "forseti-cloudsql-connection-name" {
description = "Forseti CloudSQL Connection String"
value = module.cloudsql.forseti-cloudsql-connection-name
Expand Down

0 comments on commit 1793f0b

Please sign in to comment.