github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/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  }
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `host` - (Required) The host the user can connect from. Can be an IP address.
    38      Changing this forces a new resource to be created.
    39  
    40  * `instance` - (Required) The name of the Cloud SQL instance. Changing this
    41      forces a new resource to be created.
    42  
    43  * `name` - (Required) The name of the user. Changing this forces a new resource
    44      to be created.
    45  
    46  * `password` - (Required) The users password. Can be updated.
    47  
    48  - - -
    49  
    50  * `project` - (Optional) The project in which the resource belongs. If it
    51      is not provided, the provider project is used.
    52  
    53  ## Attributes Reference
    54  
    55  Only the arguments listed above are exposed as attributes.