Skip to content

cookielab/terraform-postgresql-database

Repository files navigation

Requirements

Name Version
terraform >= 1.0.0, < 2.0.0
postgresql ~> 1.21

Basic usage of this module is as follows:

module "example" {
  	 source  = "<module-path>"
  
	 # Required variables
  	 database  = 
  
	 # Optional variables
  	 app_username  = null
  	 create_role_ro  = true
  	 create_role_rw  = true
  	 owner_username  = null
  	 role_ro_name  = null
  	 role_rw_name  = null
}

Resources

No resources.

Inputs

Name Description Type Default Required
app_username Application username string null no
create_role_ro Toggle read-only role creation bool true no
create_role_rw Toggle read-write role creation bool true no
database Database name string n/a yes
owner_username Database owner string null no
role_ro_name Read-only role name string null no
role_rw_name Read-write role name string null no

Outputs

Name Description
app_user Object returning application user and its credentials
database_name Object returning database names
owner_user Object returning database owner and its credentials
roles List of additional roles having permission on the database