how to create a cloudsql instance with terraform and custom tiers

The instance tier is the machine type and and for custom machine types you can set the values in that variable like this: db-custom-<CPUs>-<Memory_in_MB> so for example in your case would be:

  name             = "master-instance"
  database_version = "POSTGRES_11"
  region           = "us-central1"

  settings {
    # Second-generation instance tiers are based on the machine
    # type. See argument reference below.
    tier = "db-custom-12-61440"

I replicated it on my project and with this values I was able to create an instance with 12 CPUs and 60 GB memory

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top