Skip to content

Commit 772315d

Browse files
authored
r/aws_docdb_cluster(doc): clarify availability_zones behavior (#44265)
Clarifies that specifying less than 3 availability zones may result in persistent differences without an `ignore_changes` lifecycle argument. From the DocumentDB documentation. > When you create a cluster using the Amazon DocumentDB console, and you choose to create a replica in a different Availability Zone, Amazon DocumentDB creates two instances. It creates the primary instance in one Availability Zone and the replica instance in a different Availability Zone. **The cluster volume is always replicated across three Availability Zones.** - https://docs.aws.amazon.com/documentdb/latest/developerguide/regions-and-azs.html
1 parent 19a0cf3 commit 772315d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

website/docs/r/docdb_cluster.html.markdown

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ This resource supports the following arguments:
4646
* `apply_immediately` - (Optional) Specifies whether any cluster modifications
4747
are applied immediately, or during the next maintenance window. Default is
4848
`false`.
49-
* `availability_zones` - (Optional) A list of EC2 Availability Zones that
50-
instances in the DB cluster can be created in.
49+
* `availability_zones` - (Optional) A list of EC2 Availability Zones that instances in the DB cluster can be created in.
50+
DocumentDB automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next Terraform apply.
51+
We recommend specifying 3 AZs or using [the `lifecycle` configuration block `ignore_changes` argument](https://www.terraform.io/docs/configuration/meta-arguments/lifecycle.html#ignore_changes) if necessary.
5152
* `backup_retention_period` - (Optional) The days to retain backups for. Default `1`
5253
* `cluster_identifier_prefix` - (Optional, Forces new resource) Creates a unique cluster identifier beginning with the specified prefix. Conflicts with `cluster_identifier`.
5354
* `cluster_identifier` - (Optional, Forces new resources) The cluster identifier. If omitted, Terraform will assign a random, unique identifier.

0 commit comments

Comments
 (0)