https://pulumi.com logo
s

some-waitress-78905

03/14/2019, 7:11 PM
hello 🙂 I am looking at google cloud sql https://pulumi.io/reference/pkg/nodejs/@pulumi/gcp/sql/ and I am trying to enable high availability; not sure how to do this... my db instance looks like this:
Copy code
export const instance = new gcp.sql.DatabaseInstance("fleetgrid-sql", {
  region: 'us-central1',
  databaseVersion: "POSTGRES_9_6",
  settings: {
    tier: "db-f1-micro",
    ipConfiguration: {
      authorizedNetworks: [{ value: "0.0.0.0/0" }],
    },
  },
});
i

important-leather-28796

03/14/2019, 7:19 PM
based on what I saw with terraform examples it is a manual setup of replica configuration such as https://github.com/google-terraform-modules/terraform-google-cloudsql-ha/blob/master/main.tf
if you find an easy way to do this with pulumi, I’m very interested
g

gifted-island-55702

03/14/2019, 10:35 PM
@some-waitress-78905, @important-leather-28796 I think you just want to use
REGIONAL
availability type: https://www.terraform.io/docs/providers/google/r/sql_database_instance.html#availability_type
In Pulumi it would be under
settings.availabilityType
property
i

important-leather-28796

03/15/2019, 7:12 PM
Thanks @gifted-island-55702 - I had that in my notes but it is only for postgres unfortunately