diff --git a/modules/database/main.tf b/modules/database/main.tf index 4d79dbe..2d2be4a 100644 --- a/modules/database/main.tf +++ b/modules/database/main.tf @@ -10,11 +10,13 @@ resource "azurerm_mssql_database" "this" { enclave_type = var.enclave_type maintenance_configuration_name = var.elastic_pool_id == null ? var.maintenance_configuration_name : null # Conflicts with elastic pool ledger_enabled = var.ledger_enabled - license_type = var.license_type 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 + # Should be managed by owner of existing license, usually platform team. + license_type = null + tags = var.tags short_term_retention_policy { @@ -52,8 +54,12 @@ resource "azurerm_mssql_database" "this" { lifecycle { # Protect database from accidental deletion prevent_destroy = true - } + ignore_changes = [ + # Should be managed by owner of existing license, usually platform team. + license_type + ] + } } resource "azurerm_monitor_diagnostic_setting" "this" { diff --git a/modules/database/variables.tf b/modules/database/variables.tf index 2c6c507..e54998a 100644 --- a/modules/database/variables.tf +++ b/modules/database/variables.tf @@ -43,12 +43,6 @@ variable "ledger_enabled" { default = false } -variable "license_type" { - description = "Specifies a license type for this SQL database." - type = string - default = null -} - variable "max_size_gb" { description = "Sets a maximum possible size for this SQL database." type = number