github.com/pmcatominey/terraform@v0.7.0-rc2.0.20160708105029-1401a52a5cc5/website/source/docs/providers/azurerm/r/sql_database.html.markdown (about)

     1  ---
     2  layout: "azurerm"
     3  page_title: "Azure Resource Manager: azurerm_sql_database"
     4  sidebar_current: "docs-azurerm-resource-sql-database"
     5  description: |-
     6    Create a SQL Database.
     7  ---
     8  
     9  # azurerm\_sql\_database
    10  
    11  Allows you to manage an Azure SQL Database
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "azurerm_resource_group" "test" {
    17     name = "acceptanceTestResourceGroup1"
    18     location = "West US"
    19  }
    20  resource "azurerm_sql_database" "test" {
    21      name = "MySQLDatabase"
    22      resource_group_name = "${azurerm_resource_group.test.name}"
    23      location = "West US"
    24      
    25  
    26      tags {
    27      	environment = "production"
    28      }
    29  }
    30  ```
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `name` - (Required) The name of the SQL Server.
    36  
    37  * `resource_group_name` - (Required) The name of the resource group in which to
    38      create the sql server.
    39  
    40  * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    41  
    42  * `server_name` - (Required) The name of the SQL Server on which to create the database.
    43  
    44  * `create_mode` - (Optional) Specifies the type of database to create. Defaults to `Default`. See below for the accepted values/
    45  
    46  * `source_database_id` - (Optional) The URI of the source database if `create_mode` value is not `Default`.
    47  
    48  * `restore_point_in_time` - (Optional) The point in time for the restore. Only applies if `create_mode` is `PointInTimeRestore` e.g. 2013-11-08T22:00:40Z
    49  
    50  * `edition` - (Optional) The edition of the database to be created. Applies only if `create_mode` is `Default`. Valid values are: `Basic`, `Standard`, `Premium`.
    51  
    52  * `collation` - (Optional) The name of the collation. Applies only if `create_mode` is `Default`.
    53  
    54  * `max_size_bytes` - (Optional) The maximum size that the database can grow to. Applies only if `create_mode` is `Default`.
    55  
    56  * `requested_service_object_id` - (Optional) Use `requested_service_object_id` or `requested_service_object_name` to set the performance level for the database.
    57   Valid values are: `S0`, `S1`, `S2`, `S3`, `P1`, `P2`, `P4`, `P6`, `P11` and `ElasticPool`.
    58   
    59  * `requested_service_object_name` - (Optional) Use `requested_service_object_name` or `requested_service_object_id` to set the performance level for the database.
    60  
    61  * `source_database_deletion_date` - (Optional) The deletion date time of the source database. Only applies to deleted databases where `create_mode` is `PointInTimeRestore`.
    62  
    63  * `elastic_pool_name` - (Optional) The name of the elastic database pool.
    64  
    65  * `tags` - (Optional) A mapping of tags to assign to the resource. 
    66  
    67  ## Attributes Reference
    68  
    69  The following attributes are exported:
    70  
    71  * `id` - The SQL Database ID.
    72  * `creation_data` - The creation date of the SQL Database.
    73  * `default_secondary_location` - The default secondary location of the SQL Database.