Skip to content

dasmeta/terraform-aws-documentdb

Repository files navigation

terraform-aws-documentdb

Terraform modules from DasMeta to manage AWS DocumentDB

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

Name Source Version
alerts ./modules/alarms/ n/a
documentdb_cluster cloudposse/documentdb-cluster/aws 0.26.0
subnets cloudposse/dynamic-subnets/aws 2.4.2
vpc cloudposse/vpc/aws 2.1.1

Resources

Name Type
aws_availability_zones.available data source

Inputs

Name Description Type Default Required
alarms n/a
object({
enabled = optional(bool, true)
sns_topic = string
custom_values = optional(any, {})
})
n/a yes
allowed_cidr_blocks List of CIDR blocks to be allowed to connect to the DocumentDB cluster list(string) [] no
allowed_security_groups List of existing Security Groups to be allowed to connect to the DocumentDB cluster list(string) [] no
apply_immediately Specifies whether any cluster modifications are applied immediately, or during the next maintenance window bool true no
auto_minor_version_upgrade Specifies whether any minor engine upgrades will be applied automatically to the DB instance during the maintenance window or not bool true no
cluster_dns_name Name 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 format master.var.name string "" no
cluster_family The family of the DocumentDB cluster parameter group. For more details, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-parameter-group-create.html string "docdb5.0" no
cluster_parameters List of DB parameters to apply
list(object({
apply_method = string
name = string
value = string
}))
[] no
cluster_size Number of DB instances to create in the cluster number 2 no
db_port DocumentDB port number 27017 no
enabled_cloudwatch_logs_exports List of log types to export to cloudwatch. The following log types are supported: audit, profiler list(string) [] no
engine The name of the database engine to be used for this DB cluster. Defaults to docdb. Valid values: docdb string "docdb" no
engine_version The version number of the database engine to use string "5.0.0" no
instance_class The instance class to use. For more details, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-classes.html#db-instance-class-specs string "db.r6g.large" 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 "" no
master_password (Required unless a snapshot_identifier is provided) Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please refer to the DocumentDB Naming Constraints string "" no
master_username (Required unless a snapshot_identifier is provided) Username for the master DB user string "admin1" no
name ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a tag.
The "name" tag is set to the full id string. There is no tag with the value of the name input.
string "documentdb-cluster" no
preferred_backup_window Daily time range during which the backups happen string "07:00-09:00" no
preferred_maintenance_window The window to perform maintenance in. Syntax: ddd:hh24:mi-ddd:hh24:mi. string "Mon:22:00-Mon:23:00" no
reader_dns_name Name 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 format replicas.var.name string "" no
region AWS Region for S3 bucket string "eu-central-1" no
retention_period Number of days to retain backups for number 5 no
skip_final_snapshot Determines whether a final DB snapshot is created before the DB cluster is deleted bool true 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 "" no
ssm_parameter_enabled Whether an SSM parameter store value is created to store the database password. bool false no
storage_encrypted Specifies whether the DB cluster is encrypted bool true no
vpc_cidr_block VPC CIDR block string "10.0.0.0/16" no
zone_id Route53 parent zone ID. If provided (not empty), the module will create sub-domain DNS records for the DocumentDB master and replicas string "" no

Outputs

No outputs.