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

Error Creating Basic Edition SQL Database #1931

Closed
eoly opened this issue Sep 14, 2018 · 3 comments · Fixed by #2071
Closed

Error Creating Basic Edition SQL Database #1931

eoly opened this issue Sep 14, 2018 · 3 comments · Fixed by #2071
Assignees
Labels
bug service/mssql Microsoft SQL Server
Milestone

Comments

@eoly
Copy link

eoly commented Sep 14, 2018

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

Terraform v0.11.8

  • provider.azurerm v1.15.0

Affected Resource(s)

  • azurerm_sql_database

Terraform Configuration Files

resource "azurerm_resource_group" "mod" {
  name     = "test"
  location = "centralus"
}

resource "azurerm_sql_server" "test" {
  name                = "test20180914"
  location            = "centralus"
  resource_group_name = "${azurerm_resource_group.mod.name}"

  administrator_login          = "localtest"
  administrator_login_password = "**********"

  version = "12.0"
}


resource "azurerm_sql_database" "test" {
  name                = "test"
  location            = "centralus"
  resource_group_name = "${azurerm_resource_group.mod.name}"

  server_name    = "${azurerm_sql_server.test.name}"
  create_mode    = "Default"
  edition        = "Basic"

  requested_service_objective_name = "S0"
}

Expected Behavior

Basic Edition Azure SQL Database created

Actual Behavior

azurerm_sql_database.test: Creating...
  collation:                        "" => "<computed>"
  create_mode:                      "" => "Default"
  creation_date:                    "" => "<computed>"
  default_secondary_location:       "" => "<computed>"
  edition:                          "" => "Basic"
  elastic_pool_name:                "" => "<computed>"
  encryption:                       "" => "<computed>"
  location:                         "" => "centralus"
  max_size_bytes:                   "" => "<computed>"
  name:                             "" => "test"
  requested_service_objective_id:   "" => "<computed>"
  requested_service_objective_name: "" => "S0"
  resource_group_name:              "" => "test"
  restore_point_in_time:            "" => "<computed>"
  server_name:                      "" => "test20180914"
  source_database_deletion_date:    "" => "<computed>"
  source_database_id:               "" => "<computed>"
  tags.%:                           "" => "<computed>"
  threat_detection_policy.#:        "" => "<computed>"

Error: Error applying plan:

1 error(s) occurred:

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

* azurerm_sql_database.test: sql.DatabasesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: json: cannot unmarshal array into Go struct field serviceError2.details of type map[string]interface {}

Steps to Reproduce

  1. terraform apply

References

@WodansSon
Copy link
Collaborator

This is hitting the exact same issue as #1605 , the message you are getting back is actually:

{
  "code": "40808",
  "message": "The edition \u0027Basic\u0027 does not support the service objective \u0027S0\u0027.",
  "target": null,
  "details": [
    {
      "code": "40808",
      "message": "The edition \u0027Basic\u0027 does not support the service objective \u0027S0\u0027.",
      "target": null,
      "severity": "16"
    }
  ],
  "innererror": []
}

@tombuildsstuff
Copy link
Contributor

Closing this in favour of #1605 since this is the same issue

@tombuildsstuff tombuildsstuff modified the milestones: Soon, Being Sorted Oct 25, 2018
@katbyte katbyte added this to the 1.19.0 milestone Nov 14, 2018
@ghost
Copy link

ghost commented Mar 5, 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 👉 [email protected]. Thanks!

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

Successfully merging a pull request may close this issue.

4 participants