Resource: aws_docdb_cluster

Manages a DocumentDB Cluster.

Changes to a DocumentDB Cluster can occur when you manually change a parameter, such as port, and are reflected in the next maintenance window. Because of this, Terraform may report a difference in its planning phase because a modification has not yet taken place. You can use the apply_immediately flag to instruct the service to apply the change immediately (see documentation below).

Example Usage

resource "aws_docdb_cluster" "docdb" {
  cluster_identifier      = "my-docdb-cluster"
  engine                  = "docdb"
  master_username         = "foo"
  master_password         = "mustbeeightchars"
  backup_retention_period = 5
  preferred_backup_window = "07:00-09:00"
  skip_final_snapshot     = true
}

Argument Reference

For more detailed documentation about each argument, refer to the AWS official documentation.

This argument supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import DocumentDB Clusters using the cluster_identifier. For example:

import {
  to = aws_docdb_cluster.docdb_cluster
  id = "docdb-prod-cluster"
}

Using terraform import, import DocumentDB Clusters using the cluster_identifier. For example:

% terraform import aws_docdb_cluster.docdb_cluster docdb-prod-cluster