2016-07-26 20:19:39 +02:00
|
|
|
---
|
|
|
|
layout: "mysql"
|
|
|
|
page_title: "MySQL: mysql_user"
|
|
|
|
sidebar_current: "docs-mysql-resource-user"
|
|
|
|
description: |-
|
|
|
|
Creates and manages a user on a MySQL server.
|
|
|
|
---
|
|
|
|
|
|
|
|
# mysql\_user
|
|
|
|
|
|
|
|
The ``mysql_user`` resource creates and manages a user on a MySQL
|
|
|
|
server.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "mysql_user" "jdoe" {
|
2017-02-18 23:48:50 +01:00
|
|
|
user = "jdoe"
|
|
|
|
host = "example.com"
|
|
|
|
password = "password"
|
2016-07-26 20:19:39 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `user` - (Required) The name of the user.
|
|
|
|
|
|
|
|
* `host` - (Optional) The source host of the user. Defaults to "localhost".
|
|
|
|
|
|
|
|
* `password` - (Optional) The password of the user. The value of this
|
|
|
|
argument is plain-text so make sure to secure where this is defined.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
No further attributes are exported.
|