diff --git a/modules/cloudsql-instance/README.md b/modules/cloudsql-instance/README.md index 428560f3..ef58bee3 100644 --- a/modules/cloudsql-instance/README.md +++ b/modules/cloudsql-instance/README.md @@ -324,7 +324,8 @@ module "db" { | [replicas](variables.tf#L227) | Map of NAME=> {REGION, KMS_KEY} for additional read replicas. Set to null to disable replica creation. | map(object({…})) | | {} | | [root_password](variables.tf#L236) | Root password of the Cloud SQL instance. Required for MS SQL Server. | string | | null | | [ssl](variables.tf#L242) | Setting to enable SSL, set config and certificates. | object({…}) | | {} | -| [users](variables.tf#L263) | Map of users to create in the primary instance (and replicated to other replicas). For MySQL, anything after the first `@` (if present) will be used as the user's host. Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'BUILT_IN', 'CLOUD_IAM_USER' or 'CLOUD_IAM_SERVICE_ACCOUNT'. | map(object({…})) | | null | +| [time_zone](variables.tf#L263) | The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. | string | | null | +| [users](variables.tf#L269) | Map of users to create in the primary instance (and replicated to other replicas). For MySQL, anything after the first `@` (if present) will be used as the user's host. Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'BUILT_IN', 'CLOUD_IAM_USER' or 'CLOUD_IAM_SERVICE_ACCOUNT'. | map(object({…})) | | null | ## Outputs diff --git a/modules/cloudsql-instance/main.tf b/modules/cloudsql-instance/main.tf index 097772f8..de8c486c 100644 --- a/modules/cloudsql-instance/main.tf +++ b/modules/cloudsql-instance/main.tf @@ -66,6 +66,7 @@ resource "google_sql_database_instance" "primary" { activation_policy = var.activation_policy collation = var.collation connector_enforcement = var.connector_enforcement + time_zone = var.time_zone ip_configuration { ipv4_enabled = var.network_config.connectivity.public_ipv4 diff --git a/modules/cloudsql-instance/variables.tf b/modules/cloudsql-instance/variables.tf index 5f43dff3..7a8f240a 100644 --- a/modules/cloudsql-instance/variables.tf +++ b/modules/cloudsql-instance/variables.tf @@ -260,6 +260,12 @@ variable "tier" { type = string } +variable "time_zone" { + description = "The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format." + type = string + default = null +} + variable "users" { description = "Map of users to create in the primary instance (and replicated to other replicas). For MySQL, anything after the first `@` (if present) will be used as the user's host. Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'BUILT_IN', 'CLOUD_IAM_USER' or 'CLOUD_IAM_SERVICE_ACCOUNT'." type = map(object({