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.61k stars 4.65k forks source link

azurerm_mssql_elasticpool missing SKU options for Memory Optimised Premium service pools (MOPRMS) #27083

Closed crawfs closed 3 months ago

crawfs commented 3 months ago

Is there an existing issue for this?

Community Note

Terraform Version

1.5.7

AzureRM Provider Version

3.113.0

Affected Resource(s)/Data Source(s)

azurerm_mssql_elasticpool

Terraform Configuration Files

resource "azurerm_mssql_elasticpool" "sql_elasticpool" {
    license_type                   = "LicenseIncluded"
    location                       = "australiaeast"
    max_size_bytes                 = 0
    max_size_gb                    = 0
    name                           = "mysqlserver1-elasticpool"
    resource_group_name            = "myrgexample"
    server_name                    = "mysqlserver1"
    zone_redundant                 = false
    per_database_settings {
        max_capacity = 6
        min_capacity = 0
    }
   sku {
        capacity = 18
        family   = "MOPRMS"
        name     = "HS_MOPRMS"
        tier     = "Hyperscale"
    }
}

Debug Output/Panic Output

│ Error: expected sku.0.name to be one of ["BasicPool" "StandardPool" "PremiumPool" "GP_Gen4" "GP_Gen5" "GP_Fsv2" "GP_DC" "BC_Gen4" "BC_Gen5" "BC_DC" "HS_Gen5" "HS_PRMS"], got HS_MOPRMS
│ 
│   with module.sql_bc_elasticpool_small[0].azurerm_mssql_elasticpool.sql_elasticpool,
│   on ../../modules/azurerm_mssql_elasticpool/main.tf line 16, in resource "azurerm_mssql_elasticpool" "sql_elasticpool":
│   16:     name     = "HS_MOPRMS"
│ 
╵
╷
│ Error: expected sku.0.family to be one of ["Gen4" "Gen5" "Fsv2" "DC"], got MOPRMS
│ 
│   with module.sql_bc_elasticpool_small[0].azurerm_mssql_elasticpool.sql_elasticpool,
│   on ../../modules/azurerm_mssql_elasticpool/main.tf line 18, in resource "azurerm_mssql_elasticpool" "sql_elasticpool":
│   18:     family   = "MOPRMS"

Expected Behaviour

The elastic pool should be created with the desired, valid sku values.

If I create a memory optimised premium hyperscale elastic pool and import it into the state I can see the values exactly match the above configuration, however the provider does not recognise these as valid SKU values. For instance if I change the values to "Gen5" and "HS_Gen5" the plans shows the following:

~ sku {
            capacity = 18
          ~ family   = "MOPRMS" -> "Gen5"
          ~ name     = "HS_MOPRMS" -> "HS_Gen5"
            tier     = "Hyperscale"
        }

Actual Behaviour

The deployment results in an error.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

github-actions[bot] commented 2 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.