AWS Amazon DocumentDB Cluster Parameter Group

This page shows how to write Terraform and CloudFormation for Amazon DocumentDB Cluster Parameter Group and write them securely.

aws_docdb_cluster_parameter_group (Terraform)

The Cluster Parameter Group in Amazon DocumentDB can be configured in Terraform with the resource name aws_docdb_cluster_parameter_group. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_docdb_cluster_parameter_group" "parameter_group" {
  count       = length(aws_docdb_cluster_parameter_group)
  family      = lookup(var.parameter_group[count.index], "family")
  name        = lookup(var.parameter_group[count.index], "name", null)
  description = lookup(var.parameter_group[count.index], "description", null)
resource "aws_docdb_cluster_parameter_group" "docdb" {
  family =
  name   =

  parameter {
    name  = "tls"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Manages a DocumentDB Cluster Parameter Group

Tips: Best Practices for The Other AWS Amazon DocumentDB Resources

In addition to the aws_docdb, AWS Amazon DocumentDB has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.



Ensure AWS DocumentDB logging is enabled

It is better to enable AWS DocumentDB logging for auditing and following compliance requirements.

Review your AWS Amazon DocumentDB settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

AWS::DocDB::DBClusterParameterGroup (CloudFormation)

The DBClusterParameterGroup in DocDB can be configured in CloudFormation with the resource name AWS::DocDB::DBClusterParameterGroup. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.


Explanation in CloudFormation Registry

The AWS::DocDB::DBClusterParameterGroup Amazon DocumentDB (with MongoDB compatibility) resource describes a DBClusterParameterGroup. For more information, see DBClusterParameterGroup in the Amazon DocumentDB Developer Guide.

Parameters in a cluster parameter group apply to all of the instances in a cluster.

A cluster parameter group is initially created with the default parameters for the database engine used by instances in the cluster. To provide custom values for any of the parameters, you must modify the group after you create it. After you create a DB cluster parameter group, you must associate it with your cluster. For the new cluster parameter group and associated settings to take effect, you must then reboot the DB instances in the cluster without failover.

Important After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully complete the create action before the cluster parameter group is used as the default for a new cluster. This step is especially important for parameters that are critical when creating the default database for a cluster, such as the character set for the default database defined by the character_set_database parameter.

Frequently asked questions

What is AWS Amazon DocumentDB Cluster Parameter Group?

AWS Amazon DocumentDB Cluster Parameter Group is a resource for Amazon DocumentDB of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon DocumentDB Cluster Parameter Group?

For Terraform, the mikamakusa/terraform and cloudveto/terraform-modules source code examples are useful. See the Terraform Example section for further details.