Are you ever tired of figuring out how to generate a database URL or figuring out what the CLI command format is? This module is for you.
module "db1" {
source = "./.."
database_type = "mysql"
username = "foobar"
password = "pa55w0rd"
hostname = "db-host.example.com"
database_name = "db1"
}
output "db1_url" {
value = module.db1.database_url
}
output "db1_cli" {
value = module.db1.cli_command
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
database_name | Database name | string |
n/a | yes |
database_type | Database type, e.g. mysql, postgresql, etc | string |
n/a | yes |
hostname | Database hostname | string |
n/a | yes |
password | Database user password | string |
n/a | yes |
port | Database port number | number |
null |
yes |
username | Database username | string |
n/a | yes |
Name | Description |
---|---|
cli_command | CLI command line for associated database type |
database_url | The database URL |