github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/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  ```
    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  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `name` - (Required) The name of the database.
    38  
    39  * `instance` - (Required) The name of containing instance.
    40  
    41  ## Attributes Reference
    42  
    43  The following attributes are exported:
    44  
    45  * `self_link` - The URI of the created resource.