mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
provider/google: SQL user resource, documentation & tests
This commit is contained in:
parent
a9c5f8f9df
commit
6f48af81cd
47
r/sql_user.html.markdown
Normal file
47
r/sql_user.html.markdown
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: "google"
|
||||
page_title: "Google: google_sql_user"
|
||||
sidebar_current: "docs-google-sql-user"
|
||||
description: |-
|
||||
Creates a new SQL user in Google Cloud SQL.
|
||||
---
|
||||
|
||||
# google\_sql\_user
|
||||
|
||||
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).
|
||||
|
||||
## Example Usage
|
||||
|
||||
Example creating a SQL User.
|
||||
|
||||
```
|
||||
resource "google_sql_database_instance" "master" {
|
||||
name = "master-instance"
|
||||
|
||||
settings {
|
||||
tier = "D0"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_sql_user" "users" {
|
||||
name = "me"
|
||||
instance = "${google_sql_database_instance.master.name}"
|
||||
host = "me.com"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
* `name` - (Required) The name of the user.
|
||||
Changing this forces a new resource to be created.
|
||||
|
||||
* `host` - (Required) The host the user can connect from. Can be an IP address.
|
||||
Changing this forces a new resource to be created.
|
||||
|
||||
* `password` - (Required) The users password. Can be updated.
|
||||
|
||||
* `instance` - (Required) The name of the Cloud SQL instance.
|
||||
Changing this forces a new resource to be created.
|
Loading…
Reference in New Issue
Block a user