» mysql_user_password

The mysql_user_password resource sets and manages a password for a given user on a MySQL server.

» Example Usage

resource "mysql_user" "jdoe" {
  user = "jdoe"

resource "mysql_user_password" "jdoe" {
  user    = "${mysql_user.jdoe.user}"
  pgp_key = "keybase:joestump"

You can rotate passwords by running terraform taint mysql_user_password.jdoe. The next time Terraform applies a new password will be generated and the user's password will be updated accordingly.

» Argument Reference

The following arguments are supported:

  • user - (Required) The IAM user to associate with this access key.
  • pgp_key - (Required) Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
  • host - (Optional) The source host of the user. Defaults to localhost.

» Attributes Reference

The following additional attributes are exported: