Module library

RDS

Terraform module to create AWS RDS resources

Version
Submodules
db_instancedb_instance_automated_backups_replicationdb_instance_role_associationdb_option_groupdb_parameter_groupdb_subnet_group

Inputs

40 / 111
identifierrequiredstring

The name of the RDS instance

allocated_storageoptionalnumber

The allocated storage in gigabytes

Defaultnull
allow_major_version_upgradeoptionalbool

Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible

Defaultfalse
apply_immediatelyoptionalbool

Specifies whether any database modifications are applied immediately, or during the next maintenance window

Defaultfalse
auto_minor_version_upgradeoptionalbool

Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window

Defaulttrue
availability_zoneoptionalstring

The Availability Zone of the RDS instance

Defaultnull
backup_retention_periodoptionalnumber

The days to retain backups for

Defaultnull
backup_windowoptionalstring

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

Defaultnull
blue_green_updateoptionalobject({ enabled = optional(bool) })

Enables low-downtime updates using RDS Blue/Green deployments.

Defaultnull
ca_cert_identifieroptionalstring

Specifies the identifier of the CA certificate for the DB instance

Defaultnull
character_set_nameoptionalstring

The character set name to use for DB encoding in Oracle instances. This can't be changed. See Oracle Character Sets Supported in Amazon RDS and Collations and Character Sets for Microsoft SQL Server for more information. This can only be set on creation

Defaultnull
cloudwatch_log_group_classoptionalstring

Specified the log class of the log group. Possible values are: STANDARD or INFREQUENT_ACCESS

Defaultnull
cloudwatch_log_group_kms_key_idoptionalstring

The ARN of the KMS Key to use when encrypting log data

Defaultnull
cloudwatch_log_group_retention_in_daysoptionalnumber

The number of days to retain CloudWatch logs for the DB instance

Default7
cloudwatch_log_group_skip_destroyoptionalbool

Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state

Defaultnull
cloudwatch_log_group_tagsoptionalmap(string)

Additional tags for the CloudWatch log group(s)

Default{}
copy_tags_to_snapshotoptionalbool

On delete, copy all Instance tags to the final snapshot

Defaulttrue
create_cloudwatch_log_groupoptionalbool

Determines whether a CloudWatch log group is created for each `enabled_cloudwatch_logs_exports`

Defaultfalse
create_db_instanceoptionalbool

Whether to create a database instance

Defaulttrue
create_db_option_groupoptionalbool

Create a database option group

Defaulttrue
create_db_parameter_groupoptionalbool

Whether to create a database parameter group

Defaulttrue
create_db_subnet_groupoptionalbool

Whether to create a database subnet group

Defaultfalse
create_monitoring_roleoptionalbool

Create IAM role with a defined name that permits RDS to send enhanced monitoring metrics to CloudWatch Logs

Defaultfalse
custom_iam_instance_profileoptionalstring

RDS custom iam instance profile

Defaultnull
customer_owned_ip_enabledoptionalbool

Indicates whether to enable a customer-owned IP address (CoIP) for an RDS on Outposts DB instance

Defaultnull
database_insights_modeoptionalstring

The mode of Database Insights that is enabled for the instance. Valid values: standard, advanced

Defaultnull
db_instance_role_associationsoptionalmap(string)

A map of DB instance supported feature name to role association ARNs.

Default{}
db_instance_tagsoptionalmap(string)

Additional tags for the DB instance

Default{}
db_nameoptionalstring

The DB name to create. If omitted, no database is created initially

Defaultnull
db_option_group_tagsoptionalmap(string)

Additional tags for the DB option group

Default{}
db_parameter_group_tagsoptionalmap(string)

Additional tags for the DB parameter group

Default{}
db_subnet_group_descriptionoptionalstring

Description of the DB subnet group to create

Defaultnull
db_subnet_group_nameoptionalstring

Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC

Defaultnull
db_subnet_group_tagsoptionalmap(string)

Additional tags for the DB subnet group

Default{}
db_subnet_group_use_name_prefixoptionalbool

Determines whether to use `subnet_group_name` as is or create a unique name beginning with the `subnet_group_name` as the prefix

Defaulttrue
dedicated_log_volumeoptionalbool

Use a dedicated log volume (DLV) for the DB instance. Requires Provisioned IOPS.

Defaultfalse
delete_automated_backupsoptionalbool

Specifies whether to remove automated backups immediately after the DB instance is deleted

Defaulttrue
deletion_protectionoptionalbool

The database can't be deleted when this value is set to true

Defaultfalse
domainoptionalstring

The ID of the Directory Service Active Directory domain to create the instance in

Defaultnull
domain_auth_secret_arnoptionalstring

(Optional, but required if domain_fqdn is provided) The ARN for the Secrets Manager secret with the self managed Active Directory credentials for the user joining the domain. Conflicts with domain and domain_iam_role_name.

Defaultnull

1 of 111 must be supplied; the rest have defaults. Showing 40, so the site stays a static download — the remaining 71 are in the source.

Outputs

34
db_instance_address

The address of the RDS instance

db_instance_arn

The ARN of the RDS instance

db_instance_availability_zone

The availability zone of the RDS instance

db_instance_ca_cert_identifier

Specifies the identifier of the CA certificate for the DB instance

db_instance_cloudwatch_log_groups

Map of CloudWatch log groups created and their attributes

db_instance_domain

The ID of the Directory Service Active Directory domain the instance is joined to

db_instance_domain_auth_secret_arn

The ARN for the Secrets Manager secret with the self managed Active Directory credentials for the user joining the domain

db_instance_domain_dns_ips

The IPv4 DNS IP addresses of your primary and secondary self managed Active Directory domain controllers

db_instance_domain_fqdn

The fully qualified domain name (FQDN) of an self managed Active Directory domain

db_instance_domain_iam_role_name

The name of the IAM role to be used when making API calls to the Directory Service

db_instance_domain_ou

The self managed Active Directory organizational unit for your DB instance to join

db_instance_endpoint

The connection endpoint

db_instance_engine

The database engine

db_instance_engine_version_actual

The running version of the database

db_instance_hosted_zone_id

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record)

db_instance_identifier

The RDS instance identifier

db_instance_master_user_secret_arn

The ARN of the master user secret (Only available when manage_master_user_password is set to true)

db_instance_name

The database name

db_instance_port

The database port

db_instance_resource_id

The RDS Resource ID of this instance

db_instance_role_associations

A map of DB Instance Identifiers and IAM Role ARNs separated by a comma

db_instance_secretsmanager_secret_rotation_enabled

Specifies whether automatic rotation is enabled for the secret

db_instance_status

The RDS instance status

db_instance_upgrade_rollout_order

Order in which the instances are upgraded (first, second, last)

db_instance_username

The master username for the database

db_listener_endpoint

Specifies the listener connection endpoint for SQL Server Always On

db_option_group_arn

The ARN of the db option group

db_option_group_id

The db option group id

db_parameter_group_arn

The ARN of the db parameter group

db_parameter_group_id

The db parameter group id

db_subnet_group_arn

The ARN of the db subnet group

db_subnet_group_id

The db subnet group name

enhanced_monitoring_iam_role_arn

The Amazon Resource Name (ARN) specifying the monitoring role

enhanced_monitoring_iam_role_name

The name of the monitoring role

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.