Skip to content

pogosoftware/terraform-aws-rds

Repository files navigation

terraform-aws-rds

Requirements

Name Version
terraform ~> 1.0

Providers

No providers.

Modules

Name Source Version
db_parameter_group ./modules/db_parameter_group n/a
db_subnet_group ./modules/db_subnet_group n/a
rds_cluster ./modules/rds_cluster n/a
rds_cluster_instance ./modules/rds_cluster_instance n/a
rds_cluster_parameter_group ./modules/rds_cluster_parameter_group n/a

Resources

No resources.

Inputs

Name Description Type Default Required
allocated_storage he amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster. (This setting is required to create a Multi-AZ DB cluster) string null no
allow_major_version_upgrade Enable to allow major engine version upgrades when changing engine versions. Defaults to false bool false no
apply_immediately Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is false bool false no
availability_zones A list of EC2 Availability Zones for the DB cluster storage where DB cluster instances can be created. RDS automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next Terraform apply list(string) null no
backtrack_window The target backtrack window, in seconds. Only available for aurora and aurora-mysql engines currently. Defaults to 0 number 0 no
backup_retention_period The days to retain backups for. Default 1 number 1 no
cluster_identifier Required when create_rds_cluster is true. The cluster identifier string "" no
cluster_timeouts Create, update, and delete timeout configurations for the cluster map(string) {} no
copy_tags_to_snapshot Copy all Cluster tags to snapshots bool false no
create_db_parameter_group Whether to create this resource or not? bool true no
create_db_subnet_group Whether to create this resource or not? bool true no
create_rds_cluster Whether to create this resource or not? bool true no
create_rds_cluster_parameter_group Whether to create this resource or not? bool true no
database_name Name for an automatically created database on cluster creation string null no
db_cluster_instance_class The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge. Not all DB instance classes are available in all AWS Regions string null no
db_cluster_parameter_group_name A cluster parameter group to associate with the cluster string null no
db_instance_parameter_group_name Instance parameter group to associate with all instances of the DB cluster string null no
db_parameter_group_description The description of the DB parameter group. Defaults to "Managed by Terraform" string "Managed by Terraform" no
db_parameter_group_family The family of the DB parameter group string null no
db_parameter_group_name Required when create_db_parameter_group is true. The name of the DB parameter group string "" no
db_parameter_group_parameters A list of DB parameter maps to apply list(map(string)) [] no
db_parameter_group_tags A map of tags to assign to the resource map(string) {} no
db_parameter_group_use_name_prefix Determines whether to use name as is or create a unique name beginning with name as the specified prefix bool true no
db_subnet_group_description The description of the DB parameter group. Defaults to "Managed by Terraform" string "Managed by Terraform" no
db_subnet_group_name The name of the DB parameter group string "" no
db_subnet_group_subnet_ids Required when create_db_subnet_group is true. A list of VPC subnet IDs list(string) [] no
db_subnet_group_tags A map of tags to assign to the resource map(string) {} no
db_subnet_group_use_name_prefix Determines whether to use name as is or create a unique name beginning with name as the specified prefix bool true no
deletion_protection If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to true string false no
enable_global_write_forwarding Whether cluster should forward writes to an associated global cluster. Applied to secondary clusters to enable them to forward writes to an aws_rds_global_cluster's primary cluster bool null no
enable_http_endpoint Enable HTTP endpoint (data API). Only valid when engine_mode is set to serverless bool null no
enabled_cloudwatch_logs_exports Set of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: audit, error, general, slowquery, postgresql (PostgreSQL) list(string) [] no
engine The name of the database engine to be used for this DB cluster. Defaults to aurora. Valid Values: aurora, aurora-mysql, aurora-postgresql, mysql, postgres. (Note that mysql and postgres are Multi-AZ RDS clusters) string "aurora" no
engine_mode The database engine mode. Valid values: global (only valid for Aurora MySQL 1.21 and earlier), multimaster, parallelquery, provisioned, serverless. Defaults to: provisioned string "provisioned" no
engine_version The database engine version. Updating this argument results in an outage string null no
final_snapshot_identifier The name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made string null no
global_cluster_identifier The global cluster identifier specified on aws_rds_global_cluster string null no
iam_database_authentication_enabled Specifies whether or not mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled bool null no
iam_roles A List of ARNs for the IAM roles to associate to the RDS Cluster. list(string) [] no
iops The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster number null no
kms_key_id The ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true string null no
master_password Required when create_rds_cluster is true. Password for the master DB user string "" no
master_username Required when create_rds_cluster is true. Username for the master DB user string "" no
port The port on which the DB accepts connections number null no
preferred_backup_window The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC. Defaults: 02:00-03:00 string "02:00-03:00" no
preferred_maintenance_window The weekly time range during which system maintenance can occur, in (UTC). Defaults: sun:05:00-sun:06:00 string "sun:05:00-sun:06:00" no
rds_cluster_instance_tags A map of tags to assign to the DB cluster map(string) {} no
rds_cluster_instances Map of the RDS cluster instances map(any) {} no
rds_cluster_parameter_group_description The description of the DB cluster parameter group. Defaults to "Managed by Terraform" string "Managed by Terraform" no
rds_cluster_parameter_group_family The family of the DB cluster parameter group string null no
rds_cluster_parameter_group_name Required when create_rds_cluster_parameter_group is true. The name of the DB cluster parameter group string "" no
rds_cluster_parameter_group_parameters A list of DB parameter maps to apply list(map(string)) [] no
rds_cluster_parameter_group_tags A map of tags to assign to the resource map(string) {} no
rds_cluster_parameter_group_use_name_prefix Determines whether to use name as is or create a unique name beginning with name as the specified prefix bool true no
rds_cluster_tags A map of tags to assign to the DB cluster map(string) {} no
replication_source_identifier ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica string null no
restore_to_point_in_time Map of nested attributes for cloning Aurora cluster map(string) {} no
s3_import Configuration map used to restore from a Percona Xtrabackup in S3 (only MySQL is supported) map(string) null no
scaling_configuration Nested attribute with scaling properties. Only valid when engine_mode is set to serverless map(string) {} no
skip_final_snapshot Determines whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from final_snapshot_identifier bool false no
snapshot_identifier Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot string null no
source_region The source region for an encrypted replica DB cluster string null no
storage_encrypted Specifies whether the DB cluster is encrypted. The default is false for provisioned engine_mode and true for serverless engine_mode. When restoring an unencrypted snapshot_identifier, the kms_key_id argument must be provided to encrypt the restored cluster. Terraform will only perform drift detection if a configuration value is provided bool null no
storage_type Specifies the storage type to be associated with the DB cluster. (This setting is required to create a Multi-AZ DB cluster). Valid values: io1 string null no
use_cluster_identifier_prefix Determines whether to use cluster_identifier as is or create a unique name beginning with cluster_identifier as the specified prefix bool true no
vpc_security_group_ids List of VPC security groups to associate with the Cluster list(string) [] no

Outputs

Name Description
arn Amazon Resource Name (ARN) of cluster
availability_zones The availability zone of the instance
backup_retention_period The backup retention period
cluster_identifier The RDS Cluster Identifier
cluster_members List of RDS Instances that are a part of this cluster
cluster_resource_id The RDS Cluster Resource ID
database_name The database name
db_parameter_group_arn The ARN of the db parameter group
db_parameter_group_family The family of the db parameter group
db_parameter_group_id The ID of the db parameter group
db_parameter_group_name The name of the db parameter group
db_parameter_group_parameters The parameters of the db parameter group
db_subnet_group_arn The ARN of the db subnet group
db_subnet_group_id The ID of the db subnet group
db_subnet_group_name The name of the db subnet group
db_subnet_group_subnet_ids The subnets IDs of the db subnet group
endpoint The DNS address of the RDS instance
engine The database engine
engine_version The running version of the database
engine_version_actual The running version of the database
hosted_zone_id The Route53 Hosted Zone ID of the endpoint
id The RDS Cluster Identifier
master_username The master username for the database
port The database port
preferred_backup_window The daily time range during which the backups happen
preferred_maintenance_window The maintenance window
rds_cluster_instances The list of the rds cluster
rds_cluster_parameter_group_arn The ARN of the db cluster parameter group
rds_cluster_parameter_group_family The family of the db cluster parameter group
rds_cluster_parameter_group_id The ID of the db cluster parameter group
rds_cluster_parameter_group_name The name of the db cluster parameter group
rds_cluster_parameter_group_parameters The parameters of the db cluster parameter group
reader_endpoint A read-only endpoint for the Aurora cluster, automatically load-balanced across replicas
replication_source_identifier ARN of the source DB cluster or DB instance if this DB cluster is created as a Read Replica
storage_encrypted Specifies whether the DB cluster is encrypted