Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

GCP Cloud SQL Terraform module

The gcp-sql module contains all resources that is required for creating an Cloud SQL instance in Google Cloud Provider using given VPC.

Variables

Inputs Type Required/Optional
Description
Default
activation_policy string Optional This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. "ALWAYS"
availability_type string Optional The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL) "ZONAL"
app_uid string Optional Random String of the Namespace ""

| authorized_networks | list(map(string)) | Optional | A list of authorized CIDR-formatted IP address ranges that can connect to this DB. Only applies to public IP instances. | [] | | cluster_name | string | Required | Name of the cluster to which SQL instance is attached with | "" | | databases | list(string) | Required | List of databases to be added in SQL instance | [] | | db_collation | string | Optional | Collation for to be used while creating the DB | "en_US.UTF8" | | deletion_protection | bool | Optional | Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply command that deletes the instance will fail. | true | | disk_autoresize | bool | Optional | Second Generation only. Configuration to increase storage size automatically. | false | | disk_size | number | Optional | Second generation only. The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. | 10 | | disk_type | string | Optional | The type of storage to use. Must be one of PD_SSD or PD_HDD. | "PD_SSD" | | enable_ssl | bool | Optional | This specifies whether user requires SSL to be enabled or not. | false | | ext_rds_sg_cidr_block | list(string) | Optional | additional/extra cidr blocks for the sql firewall group | [] | | labels | map(string) | Required | Common Labels on the resources | null | | machine_type | string | Optional | The machine type for the instances. See this page for supported tiers and pricing: https://cloud.google.com/sql/pricing | "db-f1-micro" | | namespace | string | Required | Namespace to which SQL instance is attached with | "" | | num_read_replicas | number | Optional | The number of read replicas to create. Cloud SQL will replicate all data from the master to these replicas, which you can use to horizontally scale read traffic. | 0 | | private_network | string | Required | The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP | nul | | project_id | string | Required | The project ID to host the database. | "" | | project_number | number | Required | The project number to provide the secret access role to fetch the secrets | null | | read_replica | bool | Optional | whether sql read replica needs to be created or not | false | | read_replica_zones | list(string) | Optional | A list of compute zones where read replicas should be created. List size should match 'num_read_replicas', for example configuration, click here | [] | | region | string | Required | The region to host the database. | "" | | require_ssl | bool | Optional | True if the instance should require SSL/TLS for users connecting over IP. | false | | sql_name | string | Required | Name of your sql instance | "" | | sql_type | string | Required | The RDS instance type(MySQL, PostgreSQL) | sql_type have default values,click here | | sql_version | string | Optional | The RDS instance version | `` | | vpc_name | string | Required | The vpc name for database | "" |