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.6k stars 4.64k forks source link

Support needed for Premium Series (PRMS) SKU family in azurerm_mssql_elasticpool resource #26612

Open youngjk opened 3 months ago

youngjk commented 3 months ago

Is there an existing issue for this?

Community Note

fThe azurerm_mssql_elasticpool resource currently doesn't support the Premium Series (PRMS) SKU family for Azure SQL Elastic Pools. This SKU family is available in Azure, but attempting to use it results in a validation error in the Terraform Azure provider.

Terraform Version

1.5.7

AzureRM Provider Version

3.111.0

Affected Resource(s)/Data Source(s)

azurerm_mssql_elasticpool

Terraform Configuration Files

resource "azurerm_mssql_elasticpool" "mileiq_sql_elasticpool" {
    id                             = "xxx"
    license_type                   = "LicenseIncluded"
    location                       = "eastus"
    maintenance_configuration_name = "SQL_EastUS_DB_2"
    max_size_bytes                 = 0
    max_size_gb                    = 0
    name                           = "miq-azure-eus1-pool"
    resource_group_name            = "miq-production-db"
    server_name                    = "miq-azure-eus1"
    tags                           = {}
    zone_redundant                 = true

    per_database_settings {
        max_capacity = 8
        min_capacity = 2
    }

    sku {
        capacity = 32
        family   = "PRMS"
        name     = "HS_PRMS"
        tier     = "Hyperscale"
    }
}

Debug Output/Panic Output

Error: expected sku.0.family to be one of ["Gen4" "Gen5" "Fsv2" "DC"], got PRMS
│
│   with module.azure_sql_rest.azurerm_mssql_elasticpool.mileiq_sql_elasticpool["miq-azure-eus1-pool"],
│   on ../../modules/azure-sql/main.tf line 62, in resource "azurerm_mssql_elasticpool" "mileiq_sql_elasticpool":
│   62:     family   = lookup(each.value, "sku_family", null)

Expected Behaviour

Support SKU family and name for Hyperscale tier

Actual Behaviour

Not recognizing sku.family of PRMS

Steps to Reproduce

No response

Important Factoids

No response

References

No response

crawfs commented 2 months ago

Adding to this: MOPRMS (memory optimised premium series) is also a valid SKU family

mpanichella commented 2 months ago

@crawfs isnot working, with MOPRMS I have the error * mismatch between SKU name 'HS_PRMS' and family 'MOPRMS', expected ''

rcomm commented 1 month ago

version = "=4.2.0" I'm also encountering the Error: expected sku.0.family to be one of ["Gen4" "Gen5" "Fsv2" "DC" "MOPRMS"], got PRMS. This is preventing us from adding a Premium Hyperscale Pool. If it helps, the pool was upgraded via the portal, and now trying to align the IaC to the resource.

sku.name = "HS_PRMS" works, but looks like family has not been updated to support "PRMS". It does however support "MOPRMS"

Unable to omit family, even though it's marked as optional. mismatch between SKU name 'HS_PRMS' and family '', expected ''

Unable to add ignore_changes for sku[0].family service tier 'Hyperscale' PRMS must have a 'capacity'(10) of vCores