diff --git a/modules/databases/mssql_managed_database_v1/var/settings/srtdays.tf b/modules/databases/mssql_managed_database_v1/var/settings/srtdays.tf index e3c46fdf22..3fad8e7f80 100644 --- a/modules/databases/mssql_managed_database_v1/var/settings/srtdays.tf +++ b/modules/databases/mssql_managed_database_v1/var/settings/srtdays.tf @@ -1,9 +1,9 @@ variable "short_term_retention_days" { - description = "short_term_retention_days .The backup retention period in days. This is how many days Point-in-Time Restore will be supported. Value must be atleast 1" - nullable = false + description = "short_term_retention_days (Optional) .The backup retention period in days. This is how many days Point-in-Time Restore will be supported. Value must be atleast 1" + nullable = true validation { - condition = var.short_term_retention_days >= 1 + condition = var.short_term_retention_day == null ? true : var.short_term_retention_days >= 1 error_message = format("Not supported value: '%s'. \nAdjust your configuration file with a supported value of 1 or more days", var.short_term_retention_days) } diff --git a/modules/databases/mssql_managed_instance/managed_instance.tf b/modules/databases/mssql_managed_instance/managed_instance.tf index 31cb3843de..84757e9031 100644 --- a/modules/databases/mssql_managed_instance/managed_instance.tf +++ b/modules/databases/mssql_managed_instance/managed_instance.tf @@ -10,7 +10,7 @@ resource "azurecaf_name" "mssqlmi" { resource "azurerm_resource_group_template_deployment" "mssqlmi" { - name = "mssqlmi" + name = azurecaf_name.mssqlmi.result resource_group_name = var.resource_group_name template_content = file(local.arm_filename)