# --------------------------------------------------------------------------------------------------------------------- # REQUIRED PARAMETERS # These variables are expected to be passed in by the operator # --------------------------------------------------------------------------------------------------------------------- variable "project" { description = "The project ID to host the database in." } variable "region" { description = "The region to host the database in." } # Note, after a name db instance is used, it cannot be reused for up to one week. variable "name_prefix" { description = "The name prefix for the database instance. Will be appended with a random string. Use lowercase letters, numbers, and hyphens. Start with a letter." } variable "master_user_name" { description = "The username part for the default user credentials, i.e. 'master_user_name'@'master_user_host' IDENTIFIED BY 'master_user_password'. This should typically be set as the environment variable TF_VAR_master_user_name so you don't check it into source control." } variable "master_user_password" { description = "The password part for the default user credentials, i.e. 'master_user_name'@'master_user_host' IDENTIFIED BY 'master_user_password'. This should typically be set as the environment variable TF_VAR_master_user_password so you don't check it into source control." } # --------------------------------------------------------------------------------------------------------------------- # OPTIONAL PARAMETERS # Generally, these values won't need to be changed. # --------------------------------------------------------------------------------------------------------------------- variable "postgres_version" { description = "The engine version of the database, e.g. `POSTGRES_9_6`. See https://cloud.google.com/sql/docs/features for supported versions." default = "POSTGRES_9_6" } variable "machine_type" { description = "The machine type to use, see https://cloud.google.com/sql/pricing for more details" default = "db-f1-micro" } variable "db_name" { description = "Name for the db" default = "default" } variable "name_override" { description = "You may optionally override the name_prefix + random string by specifying an override" default = "" } # When configuring a public IP instance, you should only allow secure connections # For testing purposes, we're initially allowing unsecured connections. variable "require_ssl" { description = "True if the instance should require SSL/TLS for users connecting over IP. Note: SSL/TLS is needed to provide security when you connect to Cloud SQL using IP addresses. If you are connecting to your instance only by using the Cloud SQL Proxy or the Java Socket Library, you do not need to configure your instance to use SSL/TLS." default = false }