Open ricohomewood opened 1 year ago
Hello, we have the same issue/request. If using "SQL vulnerability assessment" with "Express configuration", we can't use terraform as the resource "azurerm_mssql_server_vulnerability_assessment" requires a storage account.
As per the document below, there are two modes and Express configuration is not covered by terraform yet: https://learn.microsoft.com/en-us/azure/defender-for-cloud/sql-azure-vulnerability-assessment-overview#what-are-the-express-and-classic-configurations
Are there plans to support the express configuration for azurerm_mssql_server_vulnerability_assessment?
Workaround with azapi provider:
resource "azapi_update_resource" "example" {
type = "Microsoft.Sql/servers/sqlVulnerabilityAssessments@2022-05-01-preview"
name = "default"
parent_id = azurerm_mssql_server.example.id
body = jsonencode({
properties = {
state = "Enabled"
}
})
}
Is there an existing issue for this?
Community Note
Description
Azure SQL now supports express configuration for SQL Server vulnerability assessments which no longer requires a storage account as this is now managed by the express configuration and the storage account version is now considered classic configuration.
Please can we look to support the express configuration for
azurerm_mssql_server_vulnerability_assessment
New or Affected Resource(s)/Data Source(s)
azurerm_mssql_server_vulnerability_assessment
Potential Terraform Configuration
References
Terraform AzAPI example:
Enable Express mode:
Baseline Creation:
REST API Create Example:
Rest API Spec: