hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.49k stars 4.59k forks source link

azurerm_mssql_database - support free limit attributes #23438

Open audunsolemdal opened 10 months ago

audunsolemdal commented 10 months ago

Is there an existing issue for this?

Community Note

Description

A preview feature has recently become available to enable up to enable one database per subscription with free limits included

This tier is only valid for serverless SKUs GP_S_Gen5_XXX from my understanding

Exporting from exporting an ARM template in the azure portal, I found these two attributes which are new.

     "type": "Microsoft.Sql/servers/databases",
     "apiVersion": "2022-08-01-preview",
///
        "useFreeLimit": {
            "value": true
        },
        "freeLimitExhaustionBehavior": {
            "value": "AutoPause"
        },

New or Affected Resource(s)/Data Source(s)

azurerm_mssql_database

Potential Terraform Configuration

resource "azurerm_mssql_database" "example" {
  name           = "yyy"
  server_id      = "xxx"
  collation      = "SQL_Latin1_General_CP1_CI_AS"
  license_type   = "LicenseIncluded"
  max_size_gb    = 32
  sku_name       = "GP_S_Gen5_2"

  use_free_limit = true
  free_limit_exhaustion_behavior = "AutoPause"
}

References

https://learn.microsoft.com/en-us/azure/azure-sql/database/free-offer?view=azuresql https://learn.microsoft.com/en-us/azure/azure-sql/database/free-offer-faq?view=azuresql https://learn.microsoft.com/en-us/azure/templates/microsoft.sql/servers/databases?pivots=deployment-language-arm-template

rcskosir commented 10 months ago

@audunsolemdal Thank you for taking the time to open this feature request!