disk_limit |
The maximum size to which storage can be auto increased. |
number |
n/a |
yes |
name |
The name of the Cloud SQL resource. |
string |
n/a |
yes |
project_id |
The project ID to manage the Cloud SQL resource. |
string |
n/a |
yes |
region |
Region for the master instance. |
string |
n/a |
yes |
users |
List of the User's name you want to create (passwords will be auto-generated). Warning! All those users will be admin and have access to all databases created with this module. |
list(string) |
n/a |
yes |
allocated_ip_range |
The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. |
string |
null |
no |
availability_type |
Is CloudSQL instance Regional or Zonal correct values = (REGIONAL|ZONAL). |
string |
"REGIONAL" |
no |
backup_configuration |
The backup_configuration settings subblock for the database setings. |
any |
{} |
no |
create_secrets |
Do we create the secrets in secret manager? |
bool |
true |
no |
custom_sql_script |
sql script to execute |
string |
"" |
no |
database_flags |
Database configuration flags. |
list(object({ name = string value = string })) |
[] |
no |
databases |
List of the default DBs you want to create. |
map(object({ export_backup = bool export_schedule = optional(string, "0 2 * * *") })) |
{} |
no |
db_charset |
Charset for the DB. |
string |
"utf8" |
no |
db_collation |
Collation for the DB. |
string |
"en_US.UTF8" |
no |
disk_type |
The disk type (PD_SSD, PD_HDD). |
string |
"PD_SSD" |
no |
encryption_key_id |
The full path to the encryption key used for the CMEK disk encryption. The provided key must be in the same region as the SQL instance. If not provided, a KMS key will be generated. |
string |
null |
no |
encryption_key_rotation_period |
The encryption key rotation period for the CMEK disk encryption. The provided key must be in the same region as the SQL instance. If encryption_key_id is defined, this variable is not used. |
string |
"7889400s" |
no |
engine_version |
The version of PostgreSQL engine. Check https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance#database_version for possible versions. |
string |
"POSTGRES_14" |
no |
instance_deletion_protection |
Used to block Terraform from deleting a SQL Instance. |
bool |
false |
no |
labels |
Labels to add to the CloudSQL and its replicas. |
map(string) |
{} |
no |
private_network |
The vpc id to create the instance into. |
string |
null |
no |
public |
Set to true if the master instance should also have a public IP (less secure). |
bool |
false |
no |
replica_disk_size |
The disk size of the replica instance in GB. |
number |
10 |
no |
replicas |
The replicas instance names and configuration. |
map(any) |
{} |
no |
sql_exporter |
The SQL exporter to use for backups if needed. |
object({ bucket_name = string pubsub_topic = string timezone = optional(string, "UTC") }) |
null |
no |
ssl_mode |
Set to false if you don not want to enforce SSL (less secure). |
string |
"ENCRYPTED_ONLY" |
no |
tier |
The database tier (db-f1-micro, db-custom-cpu-ram). |
string |
"db-f1-micro" |
no |