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

Sku Name Parameter for azurerm_mssql_elasticpool Doesn't Accept 'StandardPool' #2622

Closed
ktobin-occm opened this issue Jan 8, 2019 · 3 comments · Fixed by #2695
Closed

Sku Name Parameter for azurerm_mssql_elasticpool Doesn't Accept 'StandardPool' #2622

ktobin-occm opened this issue Jan 8, 2019 · 3 comments · Fixed by #2695
Assignees
Labels
enhancement service/mssql Microsoft SQL Server

Comments

@ktobin-occm
Copy link

ktobin-occm commented Jan 8, 2019

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 (and AzureRM Provider) Version

'Terraform v0.11.11

  • provider.azurerm v1.20.0'

Affected Resource(s)

  • azurerm_mssql_elasticpool

Terraform Configuration Files

resource "azurerm_mssql_elasticpool" "pool" {
  name                = "Pool001"
  resource_group_name = "${var.resource_group_name}"
  location            = "eastus"
  server_name         = "${azurerm_sql_server.server.name}"

  sku {
    name     = "StandardPool"
    capacity = "200"
    tier     = "GeneralPurpose"
  }

  per_database_settings {
    min_capacity = "0"
    max_capacity = "100"
  }
}

Expected Behavior

The resource should have accepted the SKU Name of StandardPool as a valid SKU Name and created the pool.

Actual Behavior

Using the value 'StandardPool' generates the folling error:

azurerm_mssql_elasticpool.pool: sql.ElasticPoolsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidSkuName" Message="Invalid SKU name 'StandardPool'."

Attempting to use a different value such as Standard returns a list of acceptable values including StandardPool:

Error: module.sqlserver.azurerm_mssql_elasticpool.pool: expected sku.0.name to be one of [BasicPool StandardPool PremiumPool GP_Gen4 GP_Gen5 BC_Gen4 BC_Gen5], got Standard

Steps to Reproduce

  1. Create terraform code using the value StandardPool for the Sku Name parameter on the azurerm_mssql_elasticpool resource.

  2. terraform apply

  • #0000
@WodansSon WodansSon self-assigned this Jan 23, 2019
@WodansSon
Copy link
Collaborator

@ktobin-occm Thanks for opening this issue. This can be terribly confusing, the new API merges support for DTU and vCore based ElasticPool SKUs into a single API. The current way you have your SKU defined you have the name set for a DTU based SKU and the tier for a vCore based SKU which is not valid and why you are seeing the error you are getting. The correct configuration for a StandardPool SKU would be:

  sku {
    name     = "StandardPool"
    capacity = "200"
    tier     = "Standard"
  }

@WodansSon
Copy link
Collaborator

WodansSon commented Jan 25, 2019

@ktobin-occm with my new PR if you attempted to use your sample configuration file you would now get the below error, which I feel is easier to understand and points out what the issue is with the file.

Error: Error running plan: 1 error(s) occurred:

* azurerm_mssql_elasticpool.test: 1 error(s) occurred:

* azurerm_mssql_elasticpool.test: Mismatch between SKU name 'StandardPool' and tier 'GeneralPurpose', expected 'tier' to be 'Standard'

@ghost
Copy link

ghost commented Mar 7, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement service/mssql Microsoft SQL Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants