Skip to content

infrastructure-as-code/terraform-mysql-application-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Application Database Terraform Module

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.

Usage

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"
}

Inputs

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)
[
"SELECT"
]
no
rw_privileges MySQL privileges for read-write user list(string)
[
"ALTER",
"ALTER ROUTINE",
"SELECT",
"UPDATE",
"DELETE",
"CREATE",
"DROP"
]
no

Outputs

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published