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

Invalid sku "azurerm_mssql_database", sku_name="GP_S_Gen5_80" #20862

Closed
1 task done
NicOps95 opened this issue Mar 9, 2023 · 3 comments
Closed
1 task done

Invalid sku "azurerm_mssql_database", sku_name="GP_S_Gen5_80" #20862

NicOps95 opened this issue Mar 9, 2023 · 3 comments
Labels

Comments

@NicOps95
Copy link

NicOps95 commented Mar 9, 2023

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.3.9

AzureRM Provider Version

3.46.0

Affected Resource(s)/Data Source(s)

resource "azurerm_mssql_database"

Terraform Configuration Files

terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
      version = "3.46.0"
    }
  }
}

provider "azurerm" {
  features {
  }
  subscription_id = var.subscription_id
  client_id       = var.client_id
  client_secret   = var.client_secret
  tenant_id       = var.tenant_id
}

resource "azurerm_resource_group" "example" {
  name     = "testsql"
  location = "West Europe"
}

resource "azurerm_mssql_server" "example" {
  name                         = "terraserverdev"
  resource_group_name          = azurerm_resource_group.example.name
  location                     = azurerm_resource_group.example.location
  version                      = "12.0"
  administrator_login          = var.administrator_login          
  administrator_login_password = var.administrator_login_password
  minimum_tls_version          = "1.2"

  azuread_administrator {
    login_username = var.login_username #user in aad
    object_id      = var.object_id #object_id of the selected user in aad
  }
}

resource "azurerm_mssql_database" "test" {
  name           = "acctest-db-d"
  server_id      = azurerm_mssql_server.example.id
  collation      = "SQL_Latin1_General_CP1_CI_AS"
  sku_name       = "GP_S_Gen5_80"
  min_capacity = 0.5 #Required for Serveless SQL Database, I tried with other values but same error.
  auto_pause_delay_in_minutes= 60 #Required for Serveless SQL Database.
}

Debug Output/Panic Output

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.test,
│   on main.tf line 26, in resource "azurerm_mssql_database" "test":
│   26:   sku_name       = "GP_S_Gen5_80"

Expected Behaviour

Like the picture below, i expect an Azure SQL Database configured as General Purpose Gen5 Serverless 80 Cores
sql_80cores.pdf

Actual Behaviour

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.test,
│ on main.tf line 26, in resource "azurerm_mssql_database" "test":
│ 26: sku_name = "GP_S_Gen5_80"

Steps to Reproduce

Change the values of these variables with yours:

subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id

administrator_login = var.administrator_login
administrator_login_password = var.administrator_login_password
login_username = var.login_username
object_id= var.object_id

-Terraform init
-Terraform plan

Important Factoids

No response

References

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_database
https://stackoverflow.com/questions/70803635/how-to-set-azure-sql-database-instance-with-min-0-5-vcores-with-terraform

Limit SQL Database
https://learn.microsoft.com/en-us/azure/azure-sql/database/resource-limits-vcore-single-databases?view=azuresql
https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose#available-regions

@NicOps95 NicOps95 added the bug label Mar 9, 2023
@github-actions github-actions bot removed the bug label Mar 9, 2023
@mikemadeja
Copy link
Contributor

Hello @NicOps95, I put in a PR and it was approved.

#20875

@mybayern1974
Copy link
Collaborator

mybayern1974 commented Mar 10, 2023

I'm closing this issue for PR #20875 has been merged with assuming that PR resolves this issue. Feel free to suggest re-active this issue if this is yet addressed.

@github-actions
Copy link

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 Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants