Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HS_PRMS_8 sku in azurerm_mssql_database gives the error This is not a valid sku name #22337

Closed
1 task done
itsmeharig opened this issue Jun 30, 2023 · 3 comments · Fixed by #23974
Closed
1 task done
Labels

Comments

@itsmeharig
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.5.0

AzureRM Provider Version

3.209.21

Affected Resource(s)/Data Source(s)

azurerm_mssql_database

Terraform Configuration Files

resource "azurerm_mssql_database" "module_sqldatabase" {
  name           = var.sqlserverdatabase_name
  server_id      = azurerm_mssql_server.module_sqlserver.id
  collation      = "SQL_Latin1_General_CP1_CI_AS"
  max_size_gb    = 2
  sku_name       = "HS_PRMS_8"
  tags = local.common_tags

  
}

Debug Output/Panic Output

Plan: 0 to add, 15 to change, 0 to destroy.
╷
│ Error: invalid value for sku_name (This is not a valid sku name. For example, a valid sku name is 'GP_S_Gen5_1','HS_Gen4_1','BC_Gen5_2', 'ElasticPool', 'Basic', 'S0', 'P1'.)
│ 
│   with azurerm_mssql_database.module_sqldatabase,
│   on database.tf line 68, in resource "azurerm_mssql_database" "module_sqldatabase":
│   68:   sku_name       = "HS_PRMS_8"
│ 
╵
##[warning]Can't find loc string for key: TerraformPlanFailed
##[error]Error: TerraformPlanFailed 1

Expected Behaviour

Resource should have been deployed with sku HS_PRMS_8

Actual Behaviour

invalid value for sku_name (This is not a valid sku name. For example, a valid sku name is 'GP_S_Gen5_1','HS_Gen4_1','BC_Gen5_2', 'ElasticPool', 'Basic', 'S0', 'P1'.)

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@rcskosir rcskosir added the service/mssql Microsoft SQL Server label Jun 30, 2023
@alexander-rondon
Copy link

alexander-rondon commented Aug 9, 2023

@itsmeharig this may be the reason terraform-provider

Checking SKUs shows

az sql db list-editions -l eastus2 -o table

ServiceObjective    Sku             Edition           Family    Capacity    Unit     Available
------------------  -------------  ----------------  --------  ----------  -------- ---------
HS_PRMS_128         HS_PRMS        Hyperscale         8IM       128          VCores  True

so HS_8IM_(24|48|80) will work but "HS_8IM_2" will still give you This is not a valid sku name. For example, a valid sku name is 'GP_S_Gen5_1','HS_Gen4_1','BC_Gen5_2', 'ElasticPool', 'Basic', 'S0', 'P1'..

I think proper validation should be done by checking for example az rest --method GET --url https://management.azure.com/subscriptions/<subscription-id>/providers/Microsoft.Sql/locations/<region>/capabilities\?api-version\=2021-02-01-preview, instead of having
"HS_8IM_(2|4|6|8|10|12|14|16|18|20|24|32|40|80)", but that works too.

@itsmeharig
Copy link
Author

itsmeharig commented Aug 9, 2023

@alexander-rondon tried that I can see HS_PRMS_8 is supported. even tried HS_8IM_8 but doesnt seem to work

{
"computeModel": "Provisioned",
"id": "d3b6ab4f-03a1-434f-b995-8bca806e89a3",
"name": "HS_PRMS_8",
"performanceLevel": {
"unit": "VCores",
"value": 8.0
},
"sku": {
"capacity": 8,
"family": "8IM",
"name": "HS_PRMS",
"tier": "Hyperscale"
},
"status": "Available",
"supportedLicenseTypes": [
{
"name": "LicenseIncluded",
"status": "Default"
},
{
"name": "BasePrice",
"status": "Available"
}
],
"supportedMaintenanceConfigurations": [
{
"name": "SQL_Default",
"status": "Default",
"zoneRedundant": true
},
{
"name": "SQL_CentralUS_DB_1",
"status": "Available",
"zoneRedundant": false
},
{
"name": "SQL_CentralUS_DB_2",
"status": "Available",
"zoneRedundant": false
}
],
"zoneRedundant": true
}

Copy link

github-actions bot commented May 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
5 participants