github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ~> **Note:** All arguments including the username and password will be stored in the raw state as plain-text.
    14  [Read more about sensitive data in state](/docs/state/sensitive-data.html).
    15  
    16  ## Example Usage
    17  
    18  Example creating a SQL User.
    19  
    20  ```hcl
    21  resource "google_sql_database_instance" "master" {
    22    name = "master-instance"
    23  
    24    settings {
    25      tier = "D0"
    26    }
    27  }
    28  
    29  resource "google_sql_user" "users" {
    30    name     = "me"
    31    instance = "${google_sql_database_instance.master.name}"
    32    host     = "me.com"
    33    password = "changeme"
    34  }
    35  ```
    36  
    37  ## Argument Reference
    38  
    39  The following arguments are supported:
    40  
    41  * `host` - (Required) The host the user can connect from. Can be an IP address.
    42      Changing this forces a new resource to be created.
    43  
    44  * `instance` - (Required) The name of the Cloud SQL instance. Changing this
    45      forces a new resource to be created.
    46  
    47  * `name` - (Required) The name of the user. Changing this forces a new resource
    48      to be created.
    49  
    50  * `password` - (Required) The users password. Can be updated.
    51  
    52  - - -
    53  
    54  * `project` - (Optional) The project in which the resource belongs. If it
    55      is not provided, the provider project is used.
    56  
    57  ## Attributes Reference
    58  
    59  Only the arguments listed above are exposed as attributes.