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

azurerm_sql_elasticpool Example Usage code fails #14785

Closed
holmesb opened this issue May 24, 2017 · 3 comments · Fixed by #14788
Closed

azurerm_sql_elasticpool Example Usage code fails #14785

holmesb opened this issue May 24, 2017 · 3 comments · Fixed by #14788

Comments

@holmesb
Copy link

holmesb commented May 24, 2017

Terraform Version

v0.9.5

Affected Resource(s)

azurerm_sql_elasticpool

Terraform Configuration Files

Example Usage code:

  name = "test"
  location = "West US"
}

resource "azurerm_sql_server" "test" {
    name = "test"
    resource_group_name = "${azurerm_resource_group.test.name}"
    location = "West US"
    version = "12.0"
    administrator_login = "4dm1n157r470r"
    administrator_login_password = "4-v3ry-53cr37-p455w0rd"
}

resource "azurerm_sql_elasticpool" "test" {
    name = "test"
    resource_group_name = "${azurerm_resource_group.test.name}"
    location = "West US"
    server_name = "${azurerm_sql_server.test.name}"
    edition = "Basic"
    dtu = 100
    db_min_dtu = 0
    db_max_dtu = 5
    pool_size = 5000
}

Expected Behavior

SQL Elastic pool is created

Actual Behavior

Running Example Usage code gives:
"invalid or unknown key: db_max_dtu"
"invalid or unknown key: db_min_dtu"

After removing these two attributes, get

Error applying plan:

1 error(s) occurred:

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

* azurerm_sql_server.test: Error creating SQL Server: PUT https://management.azure.com/subscriptions/4689b617-acad-40dc-a40f-77a442339589/resourceGroups/test_resource_group/providers/Microsoft.Sql/servers/test?api-version=2014-04-01-preview giving up after 5 attempts

Terraform does not automatically rollback in the face of errors...

And then on second attempt:

Error applying plan:

1 error(s) occurred:

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

* azurerm_sql_server.test: Error creating SQL Server: 40647 (404) - Subscription '4689b617-acad-40dc-a40f-77a442339589' does not have the server 'test'.

Terraform does not automatically rollback in the face of errors..

Steps to Reproduce

Run Example Usage code

@holmesb holmesb changed the title azurerm_sql_elasticpool model code fails azurerm_sql_elasticpool Example Usage code fails May 24, 2017
@stack72
Copy link
Contributor

stack72 commented May 24, 2017

Hi @holmesb

Apologies for this - I have just opened a PR that fixes the example - the params were named incorrectly - it will make it's way to the website within the next 10 minutes

Sorry again

Paul

@holmesb
Copy link
Author

holmesb commented May 24, 2017

Yes still fails (which is prob why you've reopened). After changing the two attributes to:
db_dtu_min = 0
db_dtu_max = 5
get the same errors in my original post above "After removing these two attributes, get error..."

@ghost
Copy link

ghost commented Apr 9, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants