MySQL & MariaDB have a robust set of privileges that may be granted to users, but figuring out what privileges are necessary and for who is going to take away time from the application developer. This module aims to provide an opinionated approach to user management (inspired by Heroku Postgres, and implemented by JawsDB and ClearDB on Heroku) so that developers can be assured their data is secured from other users on a multi-tenant database server instance, letting them focus on their applications instead.
provider "mysql" {
endpoint = "mysql-host:3306"
username = "root"
password = "securepassword"
}
module "db" {
source = "github.com/infrastructure-as-code/terraform-mysql-application-database"
database_name = "foo"
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
database_name | Name of database to be created. | string |
n/a | yes |
ro_privileges | MySQL privileges for read-only user | list(string) |
[ |
no |
rw_privileges | MySQL privileges for read-write user | list(string) |
[ |
no |
Name | Description |
---|---|
database_name | Name of database created |
ro_password | read-only user password |
ro_user | read-only username |
rw_password | read-write user password |
rw_user | read-write username |