github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/google/r/sql_database.html.markdown (about)

     1  ---
     2  layout: "google"
     3  page_title: "Google: google_sql_database"
     4  sidebar_current: "docs-google-sql-database"
     5  description: |-
     6    Creates a new SQL database in Google Cloud SQL.
     7  ---
     8  
     9  # google\_sql\_database
    10  
    11  Creates a new Google SQL Database on a Google SQL Database Instance. For more information, see the [official documentation](https://cloud.google.com/sql/), or the [JSON API](https://cloud.google.com/sql/docs/admin-api/v1beta4/databases).
    12  
    13  ## Example Usage
    14  
    15  Example creating a SQL Database.
    16  
    17  ```hcl
    18  resource "google_sql_database_instance" "master" {
    19    name = "master-instance"
    20  
    21    settings {
    22      tier = "D0"
    23    }
    24  }
    25  
    26  resource "google_sql_database" "users" {
    27    name     = "image-store-bucket"
    28    instance = "${google_sql_database_instance.master.name}"
    29  }
    30  ```
    31  
    32  ## Argument Reference
    33  
    34  The following arguments are supported:
    35  
    36  * `name` - (Required) The name of the database.
    37  
    38  * `instance` - (Required) The name of containing instance.
    39  
    40  - - -
    41  
    42  * `project` - (Optional) The project in which the resource belongs. If it
    43      is not provided, the provider project is used.
    44  
    45  ## Attributes Reference
    46  
    47  In addition to the arguments listed above, the following computed attributes are
    48  exported:
    49  
    50  * `self_link` - The URI of the created resource.