Skip to content

Commit

Permalink
docs/rds_cluster_instance: the engine/version should match that of th…
Browse files Browse the repository at this point in the history
…e cluster (#14037)

If you try to create an RDS instance with a different engine/version to
the cluster, you get an InvalidParameterCombination error from Terraform
and no instances.

Changing the behaviour so that instances inherit their config from the
cluster is a big change.

This patch just tweaks the documented examples, so if people copy/paste
the example and change the engine/version of the cluster, it will still
work correctly.  It also highlights that the engine/version should
match between the instance and the cluster.

Relates to #10585
  • Loading branch information
alexwlchan authored Jul 6, 2020
1 parent ac7b019 commit 5429f6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/docs/r/rds_cluster_endpoint.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,26 @@ resource "aws_rds_cluster_instance" "test1" {
cluster_identifier = "${aws_rds_cluster.default.id}"
identifier = "test1"
instance_class = "db.t2.small"
engine = "${aws_rds_cluster.default.engine}"
engine_version = "${aws_rds_cluster.default.engine_version}"
}
resource "aws_rds_cluster_instance" "test2" {
apply_immediately = true
cluster_identifier = "${aws_rds_cluster.default.id}"
identifier = "test2"
instance_class = "db.t2.small"
engine = "${aws_rds_cluster.default.engine}"
engine_version = "${aws_rds_cluster.default.engine_version}"
}
resource "aws_rds_cluster_instance" "test3" {
apply_immediately = true
cluster_identifier = "${aws_rds_cluster.default.id}"
identifier = "test3"
instance_class = "db.t2.small"
engine = "${aws_rds_cluster.default.engine}"
engine_version = "${aws_rds_cluster.default.engine_version}"
}
resource "aws_rds_cluster_endpoint" "eligible" {
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/rds_cluster_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ resource "aws_rds_cluster_instance" "cluster_instances" {
identifier = "aurora-cluster-demo-${count.index}"
cluster_identifier = "${aws_rds_cluster.default.id}"
instance_class = "db.r4.large"
engine = "${aws_rds_cluster.default.engine}"
engine_version = "${aws_rds_cluster.default.engine_version}"
}
resource "aws_rds_cluster" "default" {
Expand Down

0 comments on commit 5429f6a

Please sign in to comment.