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 SKU in azurerm_mssql_elasticpool gives the error This is not a valid sku name #24788

Closed
1 task done
erwabo opened this issue Feb 5, 2024 · 3 comments · Fixed by #26161
Closed
1 task done
Labels
Milestone

Comments

@erwabo
Copy link

erwabo commented Feb 5, 2024

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 and review the contribution guide to help.

Terraform Version

1.6.6

AzureRM Provider Version

3.87.0

Affected Resource(s)/Data Source(s)

azurerm_mssql_elasticpool

Terraform Configuration Files

resource "azurerm_mssql_elasticpool" "main" {
  depends_on          = [azurerm_mssql_server.main]
  name                = "ep${var.company_name}${var.envtype}"
  resource_group_name = var.rgname
  location            = var.region
  server_name         = azurerm_mssql_server.main.name
  max_size_gb         = var.ep_size
  license_type        = var.ep_license
  sku {
    name     = var.ep_name   
    tier     = var.ep_edition  
    family   = var.ep_compute_gen 
    capacity = var.ep_cores       
  }
  per_database_settings {
    min_capacity = "0"
    max_capacity = var.ep_cores
  }
  tags = {
    EnvType       = var.envtype
    SiteName      = "${var.cloudsitename}.${var.domain}"
    SuppressUntil = ""
  }
  lifecycle {
    ignore_changes = [tags]
  }
}

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"], got HS_PRMS
│ 
│   with module.SQL.azurerm_mssql_elasticpool.main,
│   on modules/SQL/main.tf line 55, in resource "azurerm_mssql_elasticpool" "main":
│   55:     name     = var.ep_name        
│ 
╵
╷
│ Error: Cannot apply incomplete plan

Expected Behaviour

Resource should have been deployed with sku HS_PRMS

Actual Behaviour

##[error]custom_ep_sku variable is not properly cased, or not one of the following: GP_Gen4 GP_Gen5 GP_Fsv2 GP_DC BC_Gen4 BC_Gen5 BC_DC HS_Gen5. Value provided was: HS_PRMS

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@github-actions github-actions bot added service/mssql Microsoft SQL Server v/3.x labels Feb 5, 2024
@rcskosir
Copy link
Contributor

rcskosir commented Feb 5, 2024

Thank you for taking the time to open this feature request! I am linking this previous PR that added similar support just to pull in relevant context. #23974
I am not familiar enough with HS_PRMS to know if that needs to be added as its own enhancement, or if you should be using one of the SKUs that was added in the above PR, so I wanted to leave the attached PR to see if it helps you with any troubleshooting.

@craigminihan
Copy link

craigminihan commented Mar 11, 2024

@rcskosir I'm seeing the same issue, my workaround of using Gen5 with ignore_changes for tier/family/capacity causes Terraform to fail if the SLO has been changed to PRMS in the Portal.

The error I see is:

╷
│ Error: service tier 'Hyperscale' PRMS must have a 'capacity'(4) of  vCores
│
│   with module.sql001.azurerm_mssql_elasticpool.ep,
│   on modules\sql\main.tf line 84, in resource "azurerm_mssql_elasticpool" "ep":
│   84: resource "azurerm_mssql_elasticpool" "ep" {
│
╵

I'd expect the ignore to avoid any evaluation of tier/familty/capacity to occur in TF. The workaround means my IaC is broken and I'll have to revert back to Gen5. In essence this should work but doesn't with hashicorp/azurerm 3.95:

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

As noted above the error is:

╷
│ 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"], got HS_PRMS
│
│   with module.sql001.azurerm_mssql_elasticpool.ep,
│   on modules\sql\main.tf line 106, in resource "azurerm_mssql_elasticpool" "ep":
│  106:     name = var.sku_name
│
╵
╷
│ Error: expected sku.0.family to be one of ["Gen4" "Gen5" "Fsv2" "DC"], got PRMS
│
│   with module.sql001.azurerm_mssql_elasticpool.ep,
│   on modules\sql\main.tf line 109, in resource "azurerm_mssql_elasticpool" "ep":
│  109:     family = var.sku_family
│
╵

The ARM markup for the resource is currently:

  "sku": {
      "name": "HS_PRMS",
      "tier": "Hyperscale",
      "family": "PRMS",
      "capacity": 4
  }

Note: 4 seems to be the minimum capacity

Copy link

github-actions bot commented Jul 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 Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants