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"


Explanation in Terraform Registry

Manages a DocumentDB Cluster Parameter Group

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.


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.