From 941c7c10f9e2e231e498ab9bb53db24570897bd6 Mon Sep 17 00:00:00 2001 From: Petri Autero Date: Wed, 30 Jan 2019 22:44:30 +0200 Subject: [PATCH] Readme for cloud sql module --- modules/cloud-sql/variables.tf | 140 +++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 modules/cloud-sql/variables.tf diff --git a/modules/cloud-sql/variables.tf b/modules/cloud-sql/variables.tf new file mode 100644 index 0000000..be32553 --- /dev/null +++ b/modules/cloud-sql/variables.tf @@ -0,0 +1,140 @@ +# --------------------------------------------------------------------------------------------------------------------- +# 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." +} + +variable "name" { + description = "The name of the database instance." +} + +variable "engine" { + description = "The engine version of the database, e.g. `MYSQL_5_7` or `POSTGRES_9_6`." +} + +variable "master_instance_name" { + description = "The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups." + default = "" +} + +variable "machine_type" { + description = "The machine tier (First Generation) or type (Second Generation). See this page for supported tiers and pricing: https://cloud.google.com/sql/pricing" + default = "db-f1-micro" +} + +variable "db_name" { + description = "Name of the default database to create" + default = "default" +} + +variable "db_charset" { + description = "The charset for the default database" + default = "" +} + +variable "db_collation" { + description = "The collation for the default database. Example for MySQL databases: 'utf8_general_ci', and Postgres: 'en_US.UTF8'" + default = "" +} + +variable "master_user_name" { + description = "The name of the default user" + default = "default" +} + +variable "master_user_host" { + description = "The host for the default user" + default = "%" +} + +variable "master_user_password" { + description = "The password for the default user." + default = "" +} + +variable "activation_policy" { + description = "This specifies when the instance should be active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`." + default = "ALWAYS" +} + +variable "authorized_gae_applications" { + description = "A list of Google App Engine (GAE) project names that are allowed to access this instance." + type = "list" + default = [] +} + +variable "disk_autoresize" { + description = "Second Generation only. Configuration to increase storage size automatically." + default = true +} + +variable "disk_size" { + description = "Second generation only. The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased." + default = 10 +} + +variable "disk_type" { + description = "Second generation only. The type of data disk: `PD_SSD` or `PD_HDD`." + default = "PD_SSD" +} + +variable "pricing_plan" { + description = "First generation only. Pricing plan for this instance, can be one of `PER_USE` or `PACKAGE`." + default = "PER_USE" +} + +variable "replication_type" { + description = "Replication type for this instance, can be one of `ASYNCHRONOUS` or `SYNCHRONOUS`." + default = "SYNCHRONOUS" +} + +variable "flags" { + description = "List of Cloud SQL flags that are applied to the database server" + default = [] + type = "list" +} + +# IGNORE EVERYTHING BELOW + +variable backup_configuration { + description = "The backup_configuration settings subblock for the database setings" + type = "map" + default = {} +} + +variable ip_configuration { + description = "The ip_configuration settings subblock" + type = "list" + default = [{}] +} + +variable location_preference { + description = "The location_preference settings subblock" + type = "list" + default = [] +} + +variable maintenance_window { + description = "The maintenance_window settings subblock" + type = "list" + default = [] +} + +variable replica_configuration { + description = "The optional replica_configuration block for the database instance" + type = "list" + default = [] +} + +# --------------------------------------------------------------------------------------------------------------------- +# OPTIONAL PARAMETERS +# Generally, these values won't need to be changed. +# --------------------------------------------------------------------------------------------------------------------- +# TODO: \ No newline at end of file