Skip to content

Commit

Permalink
Adding flag for enabling data cache in MSSQL module
Browse files Browse the repository at this point in the history
  • Loading branch information
drewmercer-bl committed Sep 10, 2024
1 parent f2c91fa commit b83b0e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/mssql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ resource "google_sql_database_instance" "default" {
}
}
}
dynamic "data_cache_config" {
for_each = var.edition == "ENTERPRISE_PLUS" && var.data_cache_enabled ? ["cache_enabled"] : []
content {
data_cache_enabled = var.data_cache_enabled
}
}
dynamic "deny_maintenance_period" {
for_each = local.is_secondary_instance ? [] : var.deny_maintenance_period
content {
Expand Down
6 changes: 6 additions & 0 deletions modules/mssql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ variable "database_flags" {
default = []
}

variable "data_cache_enabled" {
description = "Whether data cache is enabled for the instance. Defaults to false. Feature is only available for ENTERPRISE_PLUS tier and supported database_versions"
type = bool
default = false
}

variable "active_directory_config" {
description = "Active domain that the SQL instance will join."
type = map(string)
Expand Down

0 comments on commit b83b0e7

Please sign in to comment.