Skip to content

infrastructure-as-code/terraform-null-database-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Database URL Generation Module

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.

Usage

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
}

Inputs

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

Outputs

Name Description
cli_command CLI command line for associated database type
database_url The database URL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published