github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/google/r/sql_user.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_sql_user" 4 sidebar_current: "docs-google-sql-user" 5 description: |- 6 Creates a new SQL user in Google Cloud SQL. 7 --- 8 9 # google\_sql\_user 10 11 Creates a new Google SQL User on a Google SQL User 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/users). 12 13 ## Example Usage 14 15 Example creating a SQL User. 16 17 ```js 18 resource "google_sql_database_instance" "master" { 19 name = "master-instance" 20 21 settings { 22 tier = "D0" 23 } 24 } 25 26 resource "google_sql_user" "users" { 27 name = "me" 28 instance = "${google_sql_database_instance.master.name}" 29 host = "me.com" 30 password = "changeme" 31 } 32 ``` 33 34 ## Argument Reference 35 36 The following arguments are supported: 37 38 * `host` - (Required) The host the user can connect from. Can be an IP address. 39 Changing this forces a new resource to be created. 40 41 * `instance` - (Required) The name of the Cloud SQL instance. Changing this 42 forces a new resource to be created. 43 44 * `name` - (Required) The name of the user. Changing this forces a new resource 45 to be created. 46 47 * `password` - (Required) The users password. Can be updated. 48 49 - - - 50 51 * `project` - (Optional) The project in which the resource belongs. If it 52 is not provided, the provider project is used. 53 54 ## Attributes Reference 55 56 Only the arguments listed above are exposed as attributes.