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

Support Azure SQL Serverless edition #4185

Closed
StefanSchoof opened this issue Aug 29, 2019 · 13 comments
Closed

Support Azure SQL Serverless edition #4185

StefanSchoof opened this issue Aug 29, 2019 · 13 comments
Labels
new-resource service/mssql Microsoft SQL Server
Milestone

Comments

@StefanSchoof
Copy link
Contributor

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

Azure SQL has a serverless edition. It would be great if this is possible to setup with terraform.

New or Affected Resource(s)

  • azurerm_sql_database

Potential Terraform Configuration

resource "azurerm_sql_database" "test" {
  name = "mysqldatabase"
  resource_group_name = "${azurerm_resource_group.test.name}"
  location = "West US"
  server_name = "${azurerm_sql_server.test.name}"
  edition = "Serverless"
  max_vcore = 3
  min_vcore = 1
  auto_pause_delay_in_minutes = 720
 }

References

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-serverless

@tombuildsstuff
Copy link
Contributor

hi @StefanSchoof

Thanks for opening this issue :)

Taking a look through this appears to be a duplicate of #1747 - rather than having multiple issues open tracking the same thing I'm going to close this issue in favour of that one; would you mind subscribing to #1747 for updates?

Thanks!

@StefanSchoof
Copy link
Contributor Author

Thanks for the quick reply.
I do not thing this is a duplicate. In the whole #1747 is no mention of serverless. Do you think #1747 should also add the serverless edition (it is in preview)?

@tombuildsstuff
Copy link
Contributor

@StefanSchoof thanks for the clarification - I'd agree this makes sense to re-open/track separately

@craluri

This comment has been minimized.

@kszicsillag
Copy link

SQL Serverless is now out of preview: https://azure.microsoft.com/en-us/updates/azure-sql-database-serverless-is-now-generally-available/

@ravulachetan

This comment has been minimized.

@DaRosenberg

This comment has been minimized.

@abhidhar82
Copy link

I was able to create a serverless SQL DB using edition as "GeneralPurpose" and requested_service_objective_name with value like "GP_S_Gen5_2" i.e. Gen5 and vcpu =2.

Sample:
resource "azurerm_sql_database" "testdb" {
name = "testdb"
resource_group_name = "testrg"
location = ####
server_name = #####
create_mode = "Default"
edition = "GeneralPurpose"
max_size_bytes = "34359738368"
requested_service_objective_name = "GP_S_Gen5_${var.dbvcpu}"
}
Hope this helps.

@DaRosenberg
Copy link

@abhidhar82 that is definitely helpful! One question though - the vCore number you use, does that get used as the minimum or the maximum? With SQL Serverless, a range between min and max number of vCores can be specified, so just wondering which would be referred to here, and how to set the other one?

@abhidhar82
Copy link

@DaRosenberg good question. I have observed if you set the vCore to 4 then the min is set 2 and max 4 with autopause as 1 hour. I wasn't able to find away to set these.

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

Fixed via #6083

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

@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 👉 hashibot-feedback@hashicorp.com. 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

No branches or pull requests

8 participants