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

New resource: azurerm_mssql_database with support for vCore model #2849

Closed
kjhosein opened this issue Feb 7, 2019 · 9 comments · Fixed by #6083
Closed

New resource: azurerm_mssql_database with support for vCore model #2849

kjhosein opened this issue Feb 7, 2019 · 9 comments · Fixed by #6083
Labels
new-resource service/mssql Microsoft SQL Server
Milestone

Comments

@kjhosein
Copy link
Contributor

kjhosein commented Feb 7, 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

Description

Please add support for the vCore licensing model to the single SQL database resource or create a new resource that does.

(I had originally opened this in ticket #1779, but it was closed and I was unable to re-open it.)

New Resource(s)

  • New resource: azurerm_mssql_database

Potential Terraform Configuration

resource "azurerm_mssql_database" "test" {
  name                = "MyDatabase"
  resource_group_name = "best_rg_ever"
  location            = "West US"
  server_name         = "mysqlserver1"
  sku {
    name     = "GP_Gen5"
    capacity = 4
    tier     = "GeneralPurpose"
    family   = "Gen5"
  }

  per_database_settings {
    min_capacity = 0.25
    max_capacity = 4
  }
}

Structured the above potential sample code similarly to the azurerm_mssql_elasticpool resource.

References

@katbyte katbyte added the service/mssql Microsoft SQL Server label Feb 8, 2019
@Kevat
Copy link

Kevat commented Nov 21, 2019

Will this change include any of the following:

  1. Support for General Purpose, Hyperscale and Business Critical options as a part of the "tier" setting?
  2. Support for Provisioned vs. Serverless options as a part of the "Compute Tier" setting for General Purpose?
  3. Support for Secondary Replicate for Hyperscale?
  4. Support for Read Scale Out for Business Critical?

@frugecn
Copy link

frugecn commented Nov 26, 2019

Any update on this request? With the move away from DTU model to vCore model, we really need to get this one out the door, please.

@frugecn
Copy link

frugecn commented Jan 22, 2020

This doesn't necessarily need to be a new resource. It can be a modification to azurerm_sql_database. We just need to add the sku like we did in the elastic pool #1745

@ranokarno
Copy link

@frugecn is correct, we can just modify "requested_service_objective_name" to spin up VCORE database.

  name                = "mysqldatabase"
  resource_group_name = "${azurerm_resource_group.example.name}"
  location            = "West US"
  server_name         = "${azurerm_sql_server.example.name}"
  requested_service_objective_name = "GP_Gen4_1"

  tags = {
    environment = "production"
  }
}

can refer to this link here to find out more
https://docs.microsoft.com/en-us/rest/api/sql/databases/createorupdate#database
az sql db list-editions -l <location> -o table

@yupwei68
Copy link
Contributor

I'm working on this.

@katbyte katbyte added this to the v2.3.0 milestone Mar 25, 2020
katbyte pushed a commit that referenced this issue Mar 25, 2020
@ghost
Copy link

ghost commented Mar 27, 2020

This has been released in version 2.3.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.3.0"
}
# ... other configuration ...

@adback03
Copy link

Can someone explain why this is a new resource? When should we be using azurerm_sql_database versus azurerm_mssql_database? Is the old one going to get deprecated?

@yupwei68
Copy link
Contributor

hi @adback03 ,You're right that the old one is going to be deprecated. But currently, we want to still support the old ones while those still are in use.

@ghost
Copy link

ghost commented Apr 25, 2020

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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource service/mssql Microsoft SQL Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants