github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/azurerm/r/sql_elasticpool.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_sql_elasticpool" 4 sidebar_current: "docs-azurerm-resource-sql-elasticpool" 5 description: |- 6 Create a SQL Elastic Pool. 7 --- 8 9 # azurerm\_sql\_elasticpool 10 11 Allows you to manage an Azure SQL Elastic Pool. 12 13 ## Example Usage 14 15 ```hcl 16 resource "azurerm_resource_group" "test" { 17 name = "test" 18 location = "West US" 19 } 20 21 resource "azurerm_sql_server" "test" { 22 name = "test" 23 resource_group_name = "${azurerm_resource_group.test.name}" 24 location = "West US" 25 version = "12.0" 26 administrator_login = "4dm1n157r470r" 27 administrator_login_password = "4-v3ry-53cr37-p455w0rd" 28 } 29 30 resource "azurerm_sql_elasticpool" "test" { 31 name = "test" 32 resource_group_name = "${azurerm_resource_group.test.name}" 33 location = "West US" 34 server_name = "${azurerm_sql_server.test.name}" 35 edition = "Basic" 36 dtu = 100 37 db_min_dtu = 0 38 db_max_dtu = 5 39 pool_size = 5000 40 } 41 ``` 42 43 ~> **NOTE on `azurerm_sql_elasticpool`:** - The values of `edition`, `dtu`, and `pool_size` must be consistent with the [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus). Any inconsistent argument configuration will be rejected. 44 45 ## Argument Reference 46 47 The following arguments are supported: 48 49 * `name` - (Required) The name of the elastic pool. 50 51 * `resource_group_name` - (Required) The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. 52 53 * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. 54 55 * `server_name` - (Required) The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. 56 57 * `edition` - (Required) The edition of the elastic pool to be created. Valid values are `Basic`, `Standard`, and `Premium`. Refer to [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus) for details. Changing this forces a new resource to be created. 58 59 * `dtu` - (Required) The total shared DTU for the elastic pool. Valid values depend on the `edition` which has been defined. Refer to [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus) for valid combinations. 60 61 * `db_dtu_min` - (Optional) The minimum DTU which will be guaranteed to all databases in the elastic pool to be created. 62 63 * `db_dtu_max` - (Optional) The maximum DTU which will be guaranteed to all databases in the elastic pool to be created. 64 65 * `pool_size` - (Optional) The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of `edition` and `dtu` and the limits documented in [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus). If not defined when creating an elastic pool, the value is set to the size implied by `edition` and `dtu`. 66 67 * `tags` - (Optional) A mapping of tags to assign to the resource. 68 69 ## Attributes Reference 70 71 The following attributes are exported: 72 73 * `id` - The SQL Elastic Pool ID. 74 75 * `creation_date` - The creation date of the SQL Elastic Pool.