Module: rds-cluster
Terraform module to provision an RDS Aurora
cluster for MySQL or Postgres.
Supports Amazon Aurora Serverless.
Usage
For a complete example, see examples/complete.
For automated tests of the complete example using bats and Terratest (which tests and deploys the example on AWS), see test.
module "rds_cluster_aurora_postgres" {
source = "cloudposse/rds-cluster/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
name = "postgres"
engine = "aurora-postgresql"
cluster_family = "aurora-postgresql9.6"
# 1 writer, 1 reader
cluster_size = 2
# 1 writer, 3 reader
# cluster_size = 4
# 1 writer, 5 reader
# cluster_size = 6
namespace = "eg"
stage = "dev"
admin_user = "admin1"
admin_password = "Test123456789"
db_name = "dbname"
db_port = 5432
instance_type = "db.r4.large"
vpc_id = "vpc-xxxxxxxx"
security_groups = ["sg-xxxxxxxx"]
subnets = ["subnet-xxxxxxxx", "subnet-xxxxxxxx"]
zone_id = "Zxxxxxxxx"
}
module "rds_cluster_aurora_mysql_serverless" {
source = "cloudposse/rds-cluster/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "dev"
name = "db"
engine = "aurora"
engine_mode = "serverless"
cluster_family = "aurora5.6"
cluster_size = 0
admin_user = "admin1"
admin_password = "Test123456789"
db_name = "dbname"
db_port = 3306
instance_type = "db.t2.small"
vpc_id = "vpc-xxxxxxxx"
security_groups = ["sg-xxxxxxxx"]
subnets = ["subnet-xxxxxxxx", "subnet-xxxxxxxx"]
zone_id = "Zxxxxxxxx"
enable_http_endpoint = true
scaling_configuration = [
{
auto_pause = true
max_capacity = 256
min_capacity = 2
seconds_until_auto_pause = 300
}
]
}
Serverless Aurora 2.07.1 MySQL 5.7
module "rds_cluster_aurora_mysql_serverless" {
source = "cloudposse/rds-cluster/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "dev"
name = "db"
engine = "aurora-mysql"
engine_mode = "serverless"
engine_version = "5.7.mysql_aurora.2.07.1"
cluster_family = "aurora-mysql5.7"
cluster_size = 0
admin_user = "admin1"
admin_password = "Test123456789"
db_name = "dbname"
db_port = 3306
vpc_id = "vpc-xxxxxxxx"
security_groups = ["sg-xxxxxxxx"]
subnets = ["subnet-xxxxxxxx", "subnet-xxxxxxxx"]
zone_id = "Zxxxxxxxx"
enable_http_endpoint = true
scaling_configuration = [
{
auto_pause = true
max_capacity = 16
min_capacity = 1
seconds_until_auto_pause = 300
timeout_action = "ForceApplyCapacityChange"
}
]
}
module "rds_cluster_aurora_mysql" {
source = "cloudposse/rds-cluster/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
engine = "aurora"
cluster_family = "aurora-mysql5.7"
cluster_size = 2
namespace = "eg"
stage = "dev"
name = "db"
admin_user = "admin1"
admin_password = "Test123456789"
db_name = "dbname"
instance_type = "db.t2.small"
vpc_id = "vpc-xxxxxxx"
security_groups = ["sg-xxxxxxxx"]
subnets = ["subnet-xxxxxxxx", "subnet-xxxxxxxx"]
zone_id = "Zxxxxxxxx"
cluster_parameters = [
{
name = "character_set_client"
value = "utf8"
},
{
name = "character_set_connection"
value = "utf8"
},
{
name = "character_set_database"
value = "utf8"
},
{
name = "character_set_results"
value = "utf8"
},
{
name = "character_set_server"
value = "utf8"
},
{
name = "collation_connection"
value = "utf8_bin"
},
{
name = "collation_server"
value = "utf8_bin"
},
{
name = "lower_case_table_names"
value = "1"
apply_method = "pending-reboot"
},
{
name = "skip-character-set-client-handshake"
value = "1"
apply_method = "pending-reboot"
}
]
}
# create IAM role for monitoring
resource "aws_iam_role" "enhanced_monitoring" {
name = "rds-cluster-example-1"
assume_role_policy = data.aws_iam_policy_document.enhanced_monitoring.json
}
# Attach Amazon's managed policy for RDS enhanced monitoring
resource "aws_iam_role_policy_attachment" "enhanced_monitoring" {
role = aws_iam_role.enhanced_monitoring.name
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole"
}
# allow rds to assume this role
data "aws_iam_policy_document" "enhanced_monitoring" {
statement {
actions = [
"sts:AssumeRole",
]
effect = "Allow"
principals {
type = "Service"
identifiers = ["monitoring.rds.amazonaws.com"]
}
}
}
module "rds_cluster_aurora_postgres" {
source = "cloudposse/rds-cluster/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
engine = "aurora-postgresql"
cluster_family = "aurora-postgresql9.6"
cluster_size = 2
namespace = "eg"
stage = "dev"
name = "db"
admin_user = "admin1"
admin_password = "Test123456789"
db_name = "dbname"
db_port = 5432
instance_type = "db.r4.large"
vpc_id = "vpc-xxxxxxx"
security_groups = ["sg-xxxxxxxx"]
subnets = ["subnet-xxxxxxxx", "subnet-xxxxxxxx"]
zone_id = "Zxxxxxxxx"
# enable monitoring every 30 seconds
rds_monitoring_interval = 30
# reference iam role created above
rds_monitoring_role_arn = aws_iam_role.enhanced_monitoring.arn
}
Examples
Review the complete example to see how to use this module.
Variables
Required Variables
subnets
(list(string)
) requiredList of VPC subnet IDs
vpc_id
(string
) requiredVPC ID to create the cluster in (e.g.
vpc-a22222ee
)
Optional Variables
activity_stream_enabled
(bool
) optionalWhether to enable Activity Streams
Default value:
false
activity_stream_kms_key_id
(string
) optionalThe ARN for the KMS key to encrypt Activity Stream Data data. When specifying
activity_stream_kms_key_id
,activity_stream_enabled
needs to be set to trueDefault value:
""
activity_stream_mode
(string
) optionalThe mode for the Activity Streams.
async
andsync
are supported. Defaults toasync
Default value:
"async"
admin_password
(string
) optionalPassword for the master DB user. Ignored if snapshot_identifier or replication_source_identifier is provided
Default value:
""
admin_user
(string
) optionalUsername for the master DB user. Ignored if snapshot_identifier or replication_source_identifier is provided
Default value:
"admin"
admin_user_secret_kms_key_id
(string
) optionalAmazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
If not specified, the default KMS key for your Amazon Web Services account is used.Default value:
null
allocated_storage
(number
) optionalThe allocated storage in GBs
Default value:
null
allow_major_version_upgrade
(bool
) optionalEnable to allow major engine version upgrades when changing engine versions. Defaults to false.
Default value:
false
allowed_cidr_blocks
(list(string)
) optionalList of CIDR blocks allowed to access the cluster
Default value:
[ ]
allowed_ipv6_cidr_blocks
(list(string)
) optionalList of IPv6 CIDR blocks allowed to access the cluster
Default value:
[ ]
apply_immediately
(bool
) optionalSpecifies whether any cluster modifications are applied immediately, or during the next maintenance window
Default value:
true
auto_minor_version_upgrade
(bool
) optionalIndicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window
Default value:
true
autoscaling_enabled
(bool
) optionalWhether to enable cluster autoscaling
Default value:
false
autoscaling_max_capacity
(number
) optionalMaximum number of instances to be maintained by the autoscaler
Default value:
5
autoscaling_min_capacity
(number
) optionalMinimum number of instances to be maintained by the autoscaler
Default value:
1
autoscaling_policy_type
(string
) optionalAutoscaling policy type.
TargetTrackingScaling
andStepScaling
are supportedDefault value:
"TargetTrackingScaling"
autoscaling_scale_in_cooldown
(number
) optionalThe amount of time, in seconds, after a scaling activity completes and before the next scaling down activity can start. Default is 300s
Default value:
300
autoscaling_scale_out_cooldown
(number
) optionalThe amount of time, in seconds, after a scaling activity completes and before the next scaling up activity can start. Default is 300s
Default value:
300
autoscaling_target_metrics
(string
) optionalThe metrics type to use. If this value isn't provided the default is CPU utilization
Default value:
"RDSReaderAverageCPUUtilization"
autoscaling_target_value
(number
) optionalThe target value to scale with respect to target metrics
Default value:
75
backtrack_window
(number
) optionalThe target backtrack window, in seconds. Only available for aurora engine currently. Must be between 0 and 259200 (72 hours)
Default value:
0
backup_window
(string
) optionalDaily time range during which the backups happen
Default value:
"07:00-09:00"
ca_cert_identifier
(string
) optionalThe identifier of the CA certificate for the DB instance
Default value:
null
cluster_dns_name
(string
) optionalName of the cluster CNAME record to create in the parent DNS zone specified by
zone_id
. If left empty, the name will be auto-asigned using the formatmaster.var.name
Default value:
""
cluster_family
(string
) optionalThe family of the DB cluster parameter group
Default value:
"aurora5.6"
cluster_identifier
(string
) optionalThe RDS Cluster Identifier. Will use generated label ID if not supplied
Default value:
""
cluster_parameters
optionalList of DB cluster parameters to apply
Type:
list(object({
apply_method = string
name = string
value = string
}))Default value:
[ ]
cluster_size
(number
) optionalNumber of DB instances to create in the cluster
Default value:
2
cluster_type
(string
) optionalEither
regional
orglobal
.
Ifregional
will be created as a normal, standalone DB.
Ifglobal
, will be made part of a Global cluster (requiresglobal_cluster_identifier
).Default value:
"regional"
copy_tags_to_snapshot
(bool
) optionalCopy tags to backup snapshots
Default value:
false
db_cluster_instance_class
(string
) optionalThis setting is required to create a provisioned Multi-AZ DB cluster
Default value:
null
db_name
(string
) optionalDatabase name (default is not to create a database)
Default value:
""
db_parameter_group_name
(string
) optionalThe name to give to the created
aws_db_parameter_group
resource.
If omitted, the module will generate a name.Default value:
""
db_port
(number
) optionalDatabase port
Default value:
3306
deletion_protection
(bool
) optionalIf the DB instance should have deletion protection enabled
Default value:
false
egress_enabled
(bool
) optionalWhether or not to apply the egress security group rule to default security group, defaults to
true
Default value:
true
enable_global_write_forwarding
(bool
) optionalSet to
true
, to forward writes to an associated global cluster.Default value:
null
enable_http_endpoint
(bool
) optionalEnable HTTP endpoint (data API). Only valid when engine_mode is set to serverless
Default value:
false
enable_local_write_forwarding
(bool
) optionalSet to
true
, to forward writes sent to a reader to the writer instance.Default value:
null
enabled_cloudwatch_logs_exports
(list(string)
) optionalList of log types to export to cloudwatch. The following log types are supported: audit, error, general, slowquery
Default value:
[ ]
engine
(string
) optionalThe name of the database engine to be used for this DB cluster. Valid values:
aurora
,aurora-mysql
,aurora-postgresql
Default value:
"aurora"
engine_mode
(string
) optionalThe database engine mode. Valid values:
parallelquery
,provisioned
,serverless
Default value:
"provisioned"
engine_version
(string
) optionalThe version of the database engine to use. See
aws rds describe-db-engine-versions
Default value:
""
enhanced_monitoring_attributes
(list(string)
) optionalThe attributes for the enhanced monitoring IAM role
Default value:
[
"enhanced-monitoring"
]enhanced_monitoring_role_enabled
(bool
) optionalA boolean flag to enable/disable the creation of the enhanced monitoring IAM role. If set to
false
, the module will not create a new role and will userds_monitoring_role_arn
for enhanced monitoringDefault value:
false
global_cluster_identifier
(string
) optionalID of the Aurora global cluster
Default value:
""
iam_database_authentication_enabled
(bool
) optionalSpecifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled
Default value:
false
iam_roles
(list(string)
) optionalIam roles for the Aurora cluster
Default value:
[ ]
instance_availability_zone
(string
) optionalOptional parameter to place cluster instances in a specific availability zone. If left empty, will place randomly
Default value:
""
instance_parameters
optionalList of DB instance parameters to apply
Type:
list(object({
apply_method = string
name = string
value = string
}))Default value:
[ ]
instance_type
(string
) optionalInstance type to use
Default value:
"db.t2.small"
intra_security_group_traffic_enabled
(bool
) optionalWhether to allow traffic between resources inside the database's security group.
Default value:
false
iops
(number
) optionalThe amount of provisioned IOPS. Setting this implies a storage_type of 'io1'. This setting is required to create a Multi-AZ DB cluster. Check TF docs for values based on db engine
Default value:
null
kms_key_arn
(string
) optionalThe ARN for the KMS encryption key. When specifying
kms_key_arn
,storage_encrypted
needs to be set totrue
Default value:
""
maintenance_window
(string
) optionalWeekly time range during which system maintenance can occur, in UTC
Default value:
"wed:03:00-wed:04:00"
manage_admin_user_password
(bool
) optionalSet to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if master_password is provided
Default value:
false
network_type
(string
) optionalThe network type of the cluster. Valid values: IPV4, DUAL.
Default value:
"IPV4"
parameter_group_name_prefix_enabled
(bool
) optionalSet to
true
to usename_prefix
to name the cluster and database parameter groups. Set tofalse
to usename
insteadDefault value:
true
performance_insights_enabled
(bool
) optionalWhether to enable Performance Insights
Default value:
false
performance_insights_kms_key_id
(string
) optionalThe ARN for the KMS key to encrypt Performance Insights data. When specifying
performance_insights_kms_key_id
,performance_insights_enabled
needs to be set to trueDefault value:
""
performance_insights_retention_period
(number
) optionalAmount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years)
Default value:
null
publicly_accessible
(bool
) optionalSet to true if you want your cluster to be publicly accessible (such as via QuickSight)
Default value:
false
rds_cluster_parameter_group_name
(string
) optionalThe name to give to the created
aws_rds_cluster_parameter_group
resource.
If omitted, the module will generate a name.Default value:
""
rds_monitoring_interval
(number
) optionalThe interval, in seconds, between points when enhanced monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60
Default value:
0
rds_monitoring_role_arn
(string
) optionalThe ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs
Default value:
null
rds_ri_duration
(number
) optionalThe number of years to reserve the instance. Values can be 1 or 3 (or in seconds, 31536000 or 94608000)
Default value:
1
rds_ri_offering_type
(string
) optionalOffering type of reserved DB instances. Valid values are 'No Upfront', 'Partial Upfront', 'All Upfront'.
Default value:
""
rds_ri_reservation_id
(string
) optionalCustomer-specified identifier to track the reservation of the reserved DB instance.
Default value:
null
reader_dns_name
(string
) optionalName of the reader endpoint CNAME record to create in the parent DNS zone specified by
zone_id
. If left empty, the name will be auto-asigned using the formatreplicas.var.name
Default value:
""
replication_source_identifier
(string
) optionalARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica
Default value:
""
restore_to_point_in_time
optionalList of point-in-time recovery options. Valid parameters are:
source_cluster_identifier
Identifier of the source database cluster from which to restore.
restore_type
:
Type of restore to be performed. Valid options are "full-copy" and "copy-on-write".
use_latest_restorable_time
:
Set to true to restore the database cluster to the latest restorable backup time. Conflicts withrestore_to_time
.
restore_to_time
:
Date and time in UTC format to restore the database cluster to. Conflicts withuse_latest_restorable_time
.Type:
list(object({
source_cluster_identifier = string
restore_type = optional(string, "copy-on-write")
use_latest_restorable_time = optional(bool, true)
restore_to_time = optional(string, null)
}))Default value:
[ ]
retention_period
(number
) optionalNumber of days to retain backups for
Default value:
5
s3_import
optionalRestore from a Percona Xtrabackup in S3. The
bucket_name
is required to be in the same region as the resource.Type:
object({
bucket_name = string
bucket_prefix = string
ingestion_role = string
source_engine = string
source_engine_version = string
})Default value:
null
scaling_configuration
optionalList of nested attributes with scaling properties. Only valid when
engine_mode
is set toserverless
Type:
list(object({
auto_pause = bool
max_capacity = number
min_capacity = number
seconds_until_auto_pause = number
timeout_action = string
}))Default value:
[ ]
security_groups
(list(string)
) optionalList of security groups to be allowed to connect to the DB instance
Default value:
[ ]
serverlessv2_scaling_configuration
optionalserverlessv2 scaling properties
Type:
object({
min_capacity = number
max_capacity = number
})Default value:
null
skip_final_snapshot
(bool
) optionalDetermines whether a final DB snapshot is created before the DB cluster is deleted
Default value:
true
snapshot_identifier
(string
) optionalSpecifies whether or not to create this cluster from a snapshot
Default value:
null
source_region
(string
) optionalSource Region of primary cluster, needed when using encrypted storage and region replicas
Default value:
""
storage_encrypted
(bool
) optionalSpecifies whether the DB cluster is encrypted. The default is
false
forprovisioned
engine_mode
andtrue
forserverless
engine_mode
Default value:
false
storage_type
(string
) optionalOne of 'standard' (magnetic), 'gp2' (general purpose SSD), 'io1' (provisioned IOPS SSD), 'aurora', or 'aurora-iopt1'
Default value:
null
subnet_group_name
(string
) optionalDatabase subnet group name. Will use generated label ID if not supplied.
Default value:
""
timeouts_configuration
optionalList of timeout values per action. Only valid actions are
create
,update
anddelete
Type:
list(object({
create = string
update = string
delete = string
}))Default value:
[ ]
use_reserved_instances
(bool
) optionalWARNING: Observe your plans and applies carefully when using this feature.
It has potential to be very expensive if not used correctly.
Also, it is not clear what happens when the reservation expires.Whether to use reserved instances.
Default value:
false
vpc_security_group_ids
(list(string)
) optionalAdditional security group IDs to apply to the cluster, in addition to the provisioned default security group with ingress traffic from existing CIDR blocks and existing security groups
Default value:
[ ]
zone_id
(any
) optionalRoute53 DNS Zone ID as list of string (0 or 1 items). If empty, no custom DNS name will be published.
If the list contains a single Zone ID, a custom DNS name will be pulished in that zone.
Can also be a plain string, but that use is DEPRECATED because of Terraform issues.Default value:
[ ]
Context Variables
The following variables are defined in the context.tf
file of this module and part of the terraform-null-label pattern.
context.tf
file of this module and part of the terraform-null-label pattern.additional_tag_map
(map(string)
) optionalAdditional key-value pairs to add to each map in
tags_as_list_of_maps
. Not added totags
orid
.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration.Required: No
Default value:
{ }
attributes
(list(string)
) optionalID element. Additional attributes (e.g.
workers
orcluster
) to add toid
,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by thedelimiter
and treated as a single ID element.Required: No
Default value:
[ ]
context
(any
) optionalSingle object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables asnull
to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged.Required: No
Default value:
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}delimiter
(string
) optionalDelimiter to be used between ID elements.
Defaults to-
(hyphen). Set to""
to use no delimiter at all.Required: No
Default value:
null
descriptor_formats
(any
) optionalDescribe additional descriptors to be output in the
descriptors
output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
\{<br/> format = string<br/> labels = list(string)<br/> \}
(Type isany
so the map values can later be enhanced to provide additional options.)
format
is a Terraform format string to be passed to theformat()
function.
labels
is a list of labels, in order, to pass toformat()
function.
Label values will be normalized before being passed toformat()
so they will be
identical to how they appear inid
.
Default is{}
(descriptors
output will be empty).Required: No
Default value:
{ }
enabled
(bool
) optionalSet to false to prevent the module from creating any resources
Required: NoDefault value:
null
environment
(string
) optionalID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'
Required: NoDefault value:
null
id_length_limit
(number
) optionalLimit
id
to this many characters (minimum 6).
Set to0
for unlimited length.
Set tonull
for keep the existing setting, which defaults to0
.
Does not affectid_full
.Required: No
Default value:
null
label_key_case
(string
) optionalControls the letter case of the
tags
keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via thetags
input.
Possible values:lower
,title
,upper
.
Default value:title
.Required: No
Default value:
null
label_order
(list(string)
) optionalThe order in which the labels (ID elements) appear in the
id
.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present.Required: No
Default value:
null
label_value_case
(string
) optionalControls the letter case of ID elements (labels) as included in
id
,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via thetags
input.
Possible values:lower
,title
,upper
andnone
(no transformation).
Set this totitle
and setdelimiter
to""
to yield Pascal Case IDs.
Default value:lower
.Required: No
Default value:
null
labels_as_tags
(set(string)
) optionalSet of labels (ID elements) to include as tags in the
tags
output.
Default is to include all labels.
Tags with empty values will not be included in thetags
output.
Set to[]
to suppress all generated tags.
Notes:
The value of thename
tag, if included, will be theid
, not thename
.
Unlike othernull-label
inputs, the initial setting oflabels_as_tags
cannot be
changed in later chained modules. Attempts to change it will be silently ignored.Required: No
Default value:
[
"default"
]name
(string
) optionalID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as atag
.
The "name" tag is set to the fullid
string. There is no tag with the value of thename
input.Required: No
Default value:
null
namespace
(string
) optionalID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique
Required: NoDefault value:
null
regex_replace_chars
(string
) optionalTerraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set,"/[^a-zA-Z0-9-]/"
is used to remove all characters other than hyphens, letters and digits.Required: No
Default value:
null
stage
(string
) optionalID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'
Required: NoDefault value:
null
tags
(map(string)
) optionalAdditional tags (e.g.
{'BusinessUnit': 'XYZ'}
).
Neither the tag keys nor the tag values will be modified by this module.Required: No
Default value:
{ }
tenant
(string
) optionalID element (Rarely used, not included by default). A customer identifier, indicating who this instance of a resource is for
Required: NoDefault value:
null
Outputs
activity_stream_arn
Activity Stream ARN
activity_stream_name
Activity Stream Name
arn
Amazon Resource Name (ARN) of the cluster
cluster_identifier
Cluster Identifier
cluster_resource_id
The region-unique, immutable identifie of the cluster
cluster_security_groups
Default RDS cluster security groups
database_name
Database name
dbi_resource_ids
List of the region-unique, immutable identifiers for the DB instances in the cluster
endpoint
The DNS address of the RDS instance
instance_endpoints
List of DNS addresses for the DB instances in the cluster
master_host
DB Master hostname
master_username
Username for the master DB user
reader_endpoint
A read-only endpoint for the Aurora cluster, automatically load-balanced across replicas
replicas_host
Replicas hostname
reserved_instance
All information about the reserved instance(s) if created.
security_group_arn
Security Group ARN
security_group_id
Security Group ID
security_group_name
Security Group name
Dependencies
Requirements
terraform
, version:>= 1.0.0
aws
, version:>= 4.23.0
null
, version:>= 2.0
random
, version:>= 2.0
Providers
aws
, version:>= 4.23.0
random
, version:>= 2.0
Modules
Name | Version | Source | Description |
---|---|---|---|
dns_master | 0.13.0 | cloudposse/route53-cluster-hostname/aws | n/a |
dns_replicas | 0.13.0 | cloudposse/route53-cluster-hostname/aws | n/a |
enhanced_monitoring_label | 0.25.0 | cloudposse/label/null | n/a |
rds_identifier | 0.25.0 | cloudposse/label/null | n/a |
this | 0.25.0 | cloudposse/label/null | n/a |
Resources
The following resources are used by this module:
aws_appautoscaling_policy.replicas
(resource)aws_appautoscaling_target.replicas
(resource)aws_db_parameter_group.default
(resource)aws_db_subnet_group.default
(resource)aws_iam_role.enhanced_monitoring
(resource)aws_iam_role_policy_attachment.enhanced_monitoring
(resource)aws_rds_cluster.primary
(resource)aws_rds_cluster.secondary
(resource)aws_rds_cluster_activity_stream.primary
(resource)aws_rds_cluster_instance.default
(resource)aws_rds_cluster_parameter_group.default
(resource)aws_rds_reserved_instance.default
(resource)aws_security_group.default
(resource)aws_security_group_rule.egress
(resource)aws_security_group_rule.egress_ipv6
(resource)aws_security_group_rule.ingress_cidr_blocks
(resource)aws_security_group_rule.ingress_ipv6_cidr_blocks
(resource)aws_security_group_rule.ingress_security_groups
(resource)aws_security_group_rule.traffic_inside_security_group
(resource)random_pet.instance
(resource)
Data Sources
The following data sources are used by this module:
aws_iam_policy_document.enhanced_monitoring
(data source)aws_partition.current
(data source)aws_rds_reserved_instance_offering.default
(data source)