Skip to content

CMS-Enterprise/batcave-tf-postgresql

Repository files navigation

batcave-tf-postgresql

Requirements

Name Version
terraform >= 1.2
aws >= 4.61.0

Providers

Name Version
aws >= 4.61.0

Modules

Name Source Version
aurora terraform-aws-modules/rds-aurora/aws 6.1.4

Resources

Name Type
aws_db_parameter_group.db_parameter_group resource
aws_rds_cluster_parameter_group.db_cluster_parameter_group resource
aws_route53_record.www resource
aws_security_group_rule.db-egress-cluster_primary_security_group resource
aws_security_group_rule.db-egress-cluster_security_group resource
aws_security_group_rule.db-egress-worker_security_group resource
aws_route53_zone.cms_zone data source

Inputs

Name Description Type Default Required
allowed_security_groups n/a list(string) n/a yes
auto_minor_version_upgrade n/a bool true no
backup_retention_period The days to retain backups for. Default 7 number 7 no
ca_cert_identifier Specifies the identifier of the CA certificate for the DB instance string "rds-ca-rsa2048-g1" no
cluster_primary_security_group_id n/a string n/a yes
cluster_security_group_id n/a string n/a yes
create_db_subnet_group n/a bool true no
create_random_password Determines whether to create random password for RDS primary cluster bool true no
database_name n/a string n/a yes
db_cluster_parameter_group_parameters n/a list(map(string))
[
{
"name": "rds.force_autovacuum_logging_level",
"value": "warning"
}
]
no
db_parameter_group_parameters n/a list(map(string))
[
{
"name": "log_destination",
"value": "csvlog"
},
{
"name": "log_connections",
"value": "1"
},
{
"name": "log_disconnections",
"value": "1"
},
{
"name": "log_statement",
"value": "mod"
},
{
"name": "rds.force_admin_logging_level",
"value": "info"
},
{
"name": "pgaudit.log",
"value": "ddl,role,write"
}
]
no
deletion_protection n/a bool false no
engine_version The engine version to use string "14" no
instance_class Instance classes for instances created under the cluster string "db.r5.xlarge" no
instance_count How many instances to create under the cluster number 1 no
instance_identifier_pseudoprefix A string prefix for the database instance names where the instance number will be appended. This is not to be confused with the 'name_prefix' field. In general, leave this empty unless you're importing existing resources string "" no
master_username n/a string n/a yes
name The name of the RDS cluster string n/a yes
route53_record_name n/a string n/a yes
route53_zone_base_domain If route53_zone_id is an empty string, this variable is used to lookup the r53 zone dynamicaly string "" no
route53_zone_id n/a string "" no
security_group_allowed_cidrs n/a list(string) [] no
skip_final_snapshot n/a bool false no
snapshot_identifier If specified creates this database from a snapshot. Default is null. Be warned that modifying this value on an already created database WILL destroy/recreate the whole cluster. string null no
subnet_group_name Subnet group name, overriding the default of cluster_name string null no
subnets n/a list(string) n/a yes
tags n/a map(string)
{
"Owner": "Batcave"
}
no
vpc_id n/a string n/a yes
worker_security_group_id n/a string n/a yes

Outputs

Name Description
additional_cluster_endpoints A map of additional cluster endpoints and their attributes
cluster_arn Amazon Resource Name (ARN) of cluster
cluster_database_name Name for an automatically created database on cluster creation
cluster_endpoint Writer endpoint for the cluster
cluster_engine_version_actual The running version of the cluster database
cluster_hosted_zone_id The Route53 Hosted Zone ID of the endpoint
cluster_id The RDS Cluster Identifier
cluster_instances A map of cluster instances and their attributes
cluster_master_password The database master password
cluster_master_username The database master username
cluster_members List of RDS Instances that are a part of this cluster
cluster_port The database port
cluster_reader_endpoint A read-only endpoint for the cluster, automatically load-balanced across replicas
cluster_resource_id The RDS Cluster Resource ID
cluster_role_associations A map of IAM roles associated with the cluster and their attributes
db_subnet_group_name The db subnet group name
enhanced_monitoring_iam_role_arn The Amazon Resource Name (ARN) specifying the enhanced monitoring role
enhanced_monitoring_iam_role_name The name of the enhanced monitoring role
enhanced_monitoring_iam_role_unique_id Stable and unique string identifying the enhanced monitoring role
security_group_id The security group ID of the cluster