From 5429f6aeb9b58a35c9b9617bddbdbc1ab4f6f905 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Mon, 6 Jul 2020 14:55:51 +0100 Subject: [PATCH] docs/rds_cluster_instance: the engine/version should match that of the 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 https://github.com/terraform-providers/terraform-provider-aws/issues/10585 --- website/docs/r/rds_cluster_endpoint.html.markdown | 6 ++++++ website/docs/r/rds_cluster_instance.html.markdown | 2 ++ 2 files changed, 8 insertions(+) diff --git a/website/docs/r/rds_cluster_endpoint.html.markdown b/website/docs/r/rds_cluster_endpoint.html.markdown index 93341770551..742052046cf 100644 --- a/website/docs/r/rds_cluster_endpoint.html.markdown +++ b/website/docs/r/rds_cluster_endpoint.html.markdown @@ -30,6 +30,8 @@ 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" { @@ -37,6 +39,8 @@ resource "aws_rds_cluster_instance" "test2" { 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" { @@ -44,6 +48,8 @@ resource "aws_rds_cluster_instance" "test3" { 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" { diff --git a/website/docs/r/rds_cluster_instance.html.markdown b/website/docs/r/rds_cluster_instance.html.markdown index 125b24498bb..0c530918701 100644 --- a/website/docs/r/rds_cluster_instance.html.markdown +++ b/website/docs/r/rds_cluster_instance.html.markdown @@ -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" {