Skip to content

imajeetyadav/terraform-aws-rds

Repository files navigation

RDS

Requirements

Name Version
terraform >=1.4
aws >=4.58.0

Providers

Name Version
aws >=4.58.0

Modules

Name Source Version
vpc github.com/imajeetyadav/terraform-aws-vpc.git v1.0.0

Resources

Name Type
aws_db_instance.rds resource
aws_db_parameter_group.rds resource
aws_db_subnet_group.rds_subnet_ids resource
aws_secretsmanager_secret.database_name resource
aws_secretsmanager_secret.database_password resource
aws_secretsmanager_secret.database_username resource
aws_secretsmanager_secret_version.database_name resource
aws_secretsmanager_secret_version.database_password resource
aws_secretsmanager_secret_version.database_username resource
aws_security_group.rds resource

Inputs

Name Description Type Default Required
allocated_storage The storage size in GB number 20 no
apply_immediately Specifies whether any database modifications are applied immediately, or during the next maintenance window. bool true no
availability_zones List of availability zones list(string)
[
"ap-south-1a",
"ap-south-1b"
]
no
backup_retention_period The days to retain backups for. number 7 no
backup_window The daily time range (in UTC) during which automated backups are created if they are enabled. Example: 09:46-10:16. Must not overlap with maintenance_window string "03:00-06:00" no
cidr The CIDR block for the VPC. string "10.0.0.0/16" no
database_name The name of the database to create when the DB instance is created. string "demo" no
database_password Password for the master DB user. string "insecurepassword" no
database_port The port on which the DB accepts connections. number 5432 no
database_username The master username for the database. string "demo" no
delete_automated_backups Specifies whether to remove automated backups immediately after the DB instance is deleted. bool true no
deletion_protection If the DB instance should have deletion protection enabled. bool false no
enabled_cloudwatch_logs_exports Set of log types to enable for exporting to CloudWatch logs list(string)
[
"postgresql",
"upgrade"
]
no
engine The Database engine string "postgres" no
engine_version The Database version number 14.4 no
family The Database family string "postgres14" no
instance_class The instance type string "db.t3.micro" no
maintenance_window The instance maintenance window. string "Sat:00:00-Sat:03:00" no
max_allocated_storage This argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs number 100 no
multi_az Multi-az allowed bool false no
name the name of your stack string "rds-example" no
performance_insights_enabled Specifies whether Performance Insights are enabled. Defaults to false. bool true no
performance_insights_retention_period Amount of time in days to retain Performance Insights data. number 31 no
private_subnets List of private subnets list(string)
[
"10.0.16.0/20",
"10.0.48.0/20"
]
no
public_subnets List of public subnets list(string)
[
"10.0.0.0/20",
"10.0.32.0/20"
]
no
region the AWS region in which resources are created, you must set the availability_zones variable as well if you define this value to something other than the default string "ap-south-1" no
skip_final_snapshot Determines whether a final DB snapshot is created before the DB instance is deleted. bool true no
storage_encrypted Specifies whether the DB instance is encrypted. bool true no

Outputs

Name Description
rds_address RDS Endpoint