Files
terraform-google-sql/examples/postgres-replicas/README.md
2019-02-14 22:45:37 +02:00

19 lines
968 B
Markdown

# PostgreSQL Cloud SQL HA Example
This folder contains an example of how to use the [Cloud SQL module](/modules/cloud-sql) to create a [High Availability](https://cloud.google.com/sql/docs/postgres/high-availability) [Google Cloud SQL](https://cloud.google.com/sql/)
[PostgreSQL](https://cloud.google.com/sql/docs/postgres/) database cluster with a public IP and a read replica.
## How do you run this example?
To run this example, you need to:
1. Install [Terraform](https://www.terraform.io/).
1. Open up `vars.tf` and set secrets at the top of the file as environment variables and fill in any other variables in
the file that don't have defaults.
1. `terraform init`.
1. `terraform plan`.
1. If the plan looks good, run `terraform apply`.
When the templates are applied, Terraform will output the IP address of the instance
and the instance path for [connecting using the Cloud SQL Proxy](https://cloud.google.com/sql/docs/mysql/connect-admin-proxy).