diff --git a/modules/database/main.tf b/modules/database/main.tf index 2d2be4a..55df133 100644 --- a/modules/database/main.tf +++ b/modules/database/main.tf @@ -13,6 +13,7 @@ resource "azurerm_mssql_database" "this" { max_size_gb = var.max_size_gb sku_name = var.elastic_pool_id == null ? var.sku_name : "ElasticPool" storage_account_type = var.storage_account_type + auto_pause_delay_in_minutes = var.auto_pause_delay_in_minutes # Should be managed by owner of existing license, usually platform team. license_type = null diff --git a/modules/database/variables.tf b/modules/database/variables.tf index e54998a..233b7c4 100644 --- a/modules/database/variables.tf +++ b/modules/database/variables.tf @@ -139,3 +139,9 @@ variable "tags" { type = map(string) default = {} } + +variable "auto_pause_delay_in_minutes" { + description = "Time in minutes after which this SQL database is automatically paused. Value must be greater than 0 if using a SKU in the serverless compute tier." + type = number + default = 0 +}