Closed hashibot closed 7 years ago
@holmesb @tombuildsstuff There are three different issues here which make the situation a bit more complicated.
db_min_dtu
and db_max_dtu
.azurerm_sql_server
resource fails since its name test
is not unique across the entire Azure environment. This is similar to the name of storage accounts. However, the resulting error is misleading which is a different issue and it is currently not documented in the azurerm_sql_server resource documentation.dtu
value does not match the pool_size
. This needs to be fixed in the documentation of azurerm_sql_elasticpool.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 = 50
db_dtu_min = 0
db_dtu_max = 5
pool_size = 5000
}
@dominik-lekse apologies for the delayed response to this
- The example usage in the issue does not match the documenation. The example in the documentation contain the correct key names db_min_dtu and db_max_dtu.
I think this comes from an earlier incorrect version of the documentation page
- When running the example usage, the azurerm_sql_server resource fails since its name test is not unique across the entire Azure environment. This is similar to the name of storage accounts. However, the resulting error is misleading which is a different issue and it is currently not documented in the azurerm_sql_server resource documentation.
I've updated the documentation to state this needs to be globally unique in #289 - and the examples with a comment to this effect. In addition - I've now updated the code to return a friendlier error if the name is in use - and I'm just working through testing this at the moment.
- In the example usage of the azurerm_sql_elasticpool documentation, the dtu value does not match the pool_size. This needs to be fixed in the documentation of azurerm_sql_elasticpool.
I've updated this in the documentation in #289. As such I believe we should be able to close this issue once #289 is merged.
Thanks!
Hi @tombuildsstuff i am able to create the azurerm_sql_elasticpool with the basic tier edition. but when i add it as premium tier in the terraform scripts, it throws error. my script is resource "azurerm_sql_elasticpool" "elasticpool" { name = "prod-epool" resource_group_name = "${azurerm_resource_group.rg.name}" location = "${azurerm_resource_group.rg.location}" server_name = "${azurerm_sql_server.sql_server.name}" edition = "Premium" dtu = 2000 db_dtu_min = 0 db_dtu_max = 1750 pool_size = 5000 }
The error i get when i execute the terraform script is
azurerm_sql_elasticpool.elasticpool: 1 error(s) occurred:
azurerm_sql_elasticpool.elasticpool: sql.ElasticPoolsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: json: cannot unmarshal array into Go struct field serviceError2.details of type map[string]interface {}
Any help is appriciated. Thanks
@reddyed can you please open a new issue specifically for this? Thanks!
This issue was originally opened by @holmesb as hashicorp/terraform#14785. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
v0.9.5
Affected Resource(s)
azurerm_sql_elasticpool
Terraform Configuration Files
Example Usage code:
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
And then on second attempt:
Steps to Reproduce
Run Example Usage code