Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

RDS Postgres

Creates an RDS PostgreSQL database instance

Requirements

Name Version
terraform >= 0.12, <2.0
aws >= 2.40.0
random >= 2.1.2

Providers

Name Version
aws >= 2.40.0

Modules

Name Source Version
management_lambda ./management_lambda n/a

Resources

Name Type
aws_db_instance.db resource
aws_db_subnet_group.db resource
aws_iam_role_policy.management_lambda_master_url resource
aws_security_group.db resource
aws_security_group_rule.management_lambda resource
aws_security_group_rule.private resource
aws_security_group_rule.public resource
aws_ssm_parameter.master_url resource
aws_iam_policy_document.management_lambda_master_url data source

Inputs

Name Description Type Default Required
backup_retention_period The days to retain backups for. Must be between 0 and 35. number 7 no
create Should resources be created bool true no
create_management_lambda Should the management lambda function be created bool true no
db The name of the database to create when the DB instance is created, defaults to project name converted to snake_case string null no
encrypt Should the storage be encrypted bool false no
environment Kebab-cased environment name, eg. development, staging, production string n/a yes
instance_type The instance type of the RDS instance string n/a yes
management_lambda_package_path Path where the management lambda package will be created.
See zip output_path input for details.
string null no
multi_az Specifies if the RDS instance is multi-AZ bool true no
password Password for the master DB user string n/a yes
port The port on which the DB accepts connections number 5432 no
postgres_version RDS Postgres engine version string "10.15" no
prevent_destroy Should the DB be protected from accidental deletion bool true no
project Kebab-cased project name string n/a yes
public Should the DB be publicly accessible, will have no effect if placed in a private subnet bool false no
security_group_ids Security group ids which should have access to the DB list(string) [] no
storage The allocated storage in gibibytes number n/a yes
subnet_ids VPC subnet IDs in which the DB should be created list(string) n/a yes
tags Tags to add to resources that support them map(string) {} no
username Username for the master DB user string n/a yes
vpc_id VPC ID in which the DB should be created string n/a yes

Outputs

Name Description
db DB name
host DB host
management_lambda Management lambda function outputs
password DB master password
port DB port
security_group_id DB security group id
url DB connection url
username DB master username