This module of terraform allows you to create a RDS PostgreSQL instance.
- On your VPC AWS Dashboard, please tag at least 2 subnets with
type-subnet=public
due to create the aws_db_subnet_group - Create your initial module configuration from module.tfvars.example
- In the
main.tf
file please adjust your profile name in the provider section
Just run your plan/apply as below:
terraform plan -var-file=module.tfvars
Name | Version |
---|---|
terraform | >= 0.14 |
aws | ~> 3.74.0 |
Name | Version |
---|---|
aws | 3.74.3 |
No modules.
Name | Type |
---|---|
aws_db_instance.default | resource |
aws_db_subnet_group.selected | resource |
aws_security_group.selected | resource |
aws_security_group_rule.allow_all_access | resource |
aws_security_group_rule.allow_all_access_ipv6 | resource |
aws_security_group_rule.allow_all_outbound | resource |
aws_region.selected | data source |
aws_subnet_ids.selected | data source |
aws_vpc.selected | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
apply_immediately | Boolean value to apply changes immediately. | bool |
false |
no |
backup_retention_period | The amount of days of backup retention. | number |
1 |
no |
backup_window | The daily time range (in UTC) during which automated backups are created if they are enabled. | string |
n/a | yes |
copy_tags_to_snapshot | Boolean value to copy all the tags from RDS to snapshots. | bool |
true |
no |
deletion_protection | Boolean value to enable deletion protection. | bool |
true |
no |
engine | The RDS engine. | string |
"postgres" |
no |
engine_version | The RDS engine version. | string |
"12.16" |
no |
env | The environmet name where RDS will be created. | string |
n/a | yes |
instance_class | The instance_class for RDS. | string |
"db.t4g.micro" |
no |
maintenance_window | The window to perform maintenance in. [ddd:hh24:mi-ddd:hh24:mi] | string |
n/a | yes |
master_password | The database master username's password. | string |
n/a | yes |
master_username | The database master username. | string |
n/a | yes |
monitoring_interval | The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. | number |
60 |
no |
multi_az | Boolean variable to specify if the RDS instance is multi-AZ (Multi available zones). | bool |
false |
no |
project | The project name. | string |
n/a | yes |
publicly_accessible | Boolean value to make RDS publicly accessible. | bool |
false |
no |
service_port | The RDS port to connect. | number |
5432 |
no |
skip_final_snapshot | Boolean value to skip final snapshot. | bool |
true |
no |
Name | Description |
---|---|
rds_endpoint | The domain-name of the RDS endpoint |
Copyright © 2024 Armando Uch