From f3433dbf6dda0b297bb32556471915bffbef0a91 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Fri, 20 Oct 2023 01:27:10 +0200 Subject: [PATCH 1/7] feat: add `network_type` and `ip_discovery` to ElastiCache Replication Group --- .../service/elasticache/replication_group.go | 34 +++++++++++++++++++ ...lasticache_replication_group.html.markdown | 2 ++ 2 files changed, 36 insertions(+) diff --git a/internal/service/elasticache/replication_group.go b/internal/service/elasticache/replication_group.go index abbad7790bd..bde210b0dea 100644 --- a/internal/service/elasticache/replication_group.go +++ b/internal/service/elasticache/replication_group.go @@ -134,6 +134,12 @@ func ResourceReplicationGroup() *schema.Resource { "snapshot_name", }, }, + "ip_discovery": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice(elasticache.IpDiscovery_Values(), false), + }, "log_delivery_configuration": { Type: schema.TypeSet, Optional: true, @@ -183,6 +189,13 @@ func ResourceReplicationGroup() *schema.Resource { Optional: true, Default: false, }, + "network_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(elasticache.NetworkType_Values(), false), + }, "node_type": { Type: schema.TypeString, Optional: true, @@ -405,6 +418,14 @@ func resourceReplicationGroupCreate(ctx context.Context, d *schema.ResourceData, input.CacheParameterGroupName = aws.String(v.(string)) } + if v, ok := d.GetOk("ip_discovery"); ok { + input.IpDiscovery = aws.String(v.(string)) + } + + if v, ok := d.GetOk("network_type"); ok { + input.NetworkType = aws.String(v.(string)) + } + if v, ok := d.GetOk("port"); ok { input.Port = aws.Int64(int64(v.(int))) } @@ -597,6 +618,9 @@ func resourceReplicationGroupRead(ctx context.Context, d *schema.ResourceData, m d.Set("arn", rgp.ARN) d.Set("data_tiering_enabled", aws.StringValue(rgp.DataTiering) == elasticache.DataTieringStatusEnabled) + d.Set("ip_discovery", rgp.IpDiscovery) + d.Set("network_type", rgp.NetworkType) + d.Set("log_delivery_configuration", flattenLogDeliveryConfigurations(rgp.LogDeliveryConfigurations)) d.Set("snapshot_window", rgp.SnapshotWindow) d.Set("snapshot_retention_limit", rgp.SnapshotRetentionLimit) @@ -694,6 +718,16 @@ func resourceReplicationGroupUpdate(ctx context.Context, d *schema.ResourceData, requestUpdate = true } + if d.HasChange("ip_discovery") { + input.IpDiscovery = aws.String(d.Get("ip_discovery").(string)) + requestUpdate = true + } + + if d.HasChange("network_type") { + input.IpDiscovery = aws.String(d.Get("network_type").(string)) + requestUpdate = true + } + if d.HasChange("automatic_failover_enabled") { input.AutomaticFailoverEnabled = aws.Bool(d.Get("automatic_failover_enabled").(bool)) requestUpdate = true diff --git a/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown b/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown index 2808fe732af..c5cf7e556fa 100644 --- a/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown +++ b/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown @@ -240,12 +240,14 @@ The following arguments are optional: or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`. Otherwise, specify the full version desired, e.g., `5.0.6`. The actual engine version used is returned in the attribute `engine_version_actual`, see [Attribute Reference](#attribute-reference) below. +* `ip_discovery` - (Optional) The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`. * `final_snapshot_identifier` - (Optional) The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. * `global_replication_group_id` - (Optional) The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If `global_replication_group_id` is set, the `num_node_groups` parameter cannot be set. * `kms_key_id` - (Optional) The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `at_rest_encryption_enabled = true`. * `log_delivery_configuration` - (Optional, Redis only) Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/slowlog) or Redis [Engine Log](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See the documentation on [Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See [Log Delivery Configuration](#log-delivery-configuration) below for more details. * `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` * `multi_az_enabled` - (Optional) Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automatic_failover_enabled` must also be enabled. Defaults to `false`. +* `network_type` - (Optional) The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dual_stack`. * `node_type` - (Optional) Instance class to be used. See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html). Required unless `global_replication_group_id` is set. Cannot be set if `global_replication_group_id` is set. * `notification_topic_arn` – (Optional) ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` * `num_cache_clusters` - (Optional) Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `num_node_groups`. Defaults to `1`. From 823e25f38cddd64bc3504010163ab255b0a13285 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Fri, 20 Oct 2023 01:36:45 +0200 Subject: [PATCH 2/7] feat: add networkType and ipDiscovery tests to ElastiCache Replication Group --- .../elasticache/replication_group_test.go | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/internal/service/elasticache/replication_group_test.go b/internal/service/elasticache/replication_group_test.go index 1ff858a40c7..53ad65e6e77 100644 --- a/internal/service/elasticache/replication_group_test.go +++ b/internal/service/elasticache/replication_group_test.go @@ -792,6 +792,74 @@ func TestAccElastiCacheReplicationGroup_ValidationMultiAz_noAutomaticFailover(t }) } +func TestAccElastiCacheReplicationGroup_ipDiscovery(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var rg elasticache.ReplicationGroup + resourceName := "aws_elasticache_replication_group.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, elasticache.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckReplicationGroupDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccReplicationGroupConfig_ipDiscovery(rName, "ipv6"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckReplicationGroupExists(ctx, resourceName, &rg), + resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "1"), + resource.TestCheckResourceAttr(resourceName, "preferred_cache_cluster_azs.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "preferred_cache_cluster_azs"}, + }, + }, + }) +} + +func TestAccElastiCacheReplicationGroup_networkType(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var rg elasticache.ReplicationGroup + resourceName := "aws_elasticache_replication_group.test" + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, elasticache.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckReplicationGroupDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccReplicationGroupConfig_networkType(rName, "ipv6", "ipv6"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckReplicationGroupExists(ctx, resourceName, &rg), + resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "1"), + resource.TestCheckResourceAttr(resourceName, "preferred_cache_cluster_azs.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "preferred_cache_cluster_azs"}, + }, + }, + }) +} + func TestAccElastiCacheReplicationGroup_ClusterMode_basic(t *testing.T) { ctx := acctest.Context(t) if testing.Short() { @@ -3021,6 +3089,81 @@ resource "aws_security_group" "test" { ) } +func testAccReplicationGroupConfig_ipDiscovery(rName, ipDiscovery string) string { + return acctest.ConfigCompose( + acctest.ConfigVPCWithSubnetsIPv6(rName, 1), + fmt.Sprintf(` +resource "aws_elasticache_replication_group" "test" { + replication_group_id = %[1]q + description = "test description" + node_type = "cache.t3.small" + num_cache_clusters = 1 + port = 6379 + subnet_group_name = aws_elasticache_subnet_group.test.name + ip_discovery = %[2]q + security_group_ids = [aws_security_group.test.id] + preferred_cache_cluster_azs = [data.aws_availability_zones.available.names[0]] +} + +resource "aws_elasticache_subnet_group" "test" { + name = %[1]q + subnet_ids = aws_subnet.test[*].id +} + +resource "aws_security_group" "test" { + name = %[1]q + description = "tf-test-security-group-descr" + vpc_id = aws_vpc.test.id + + ingress { + from_port = -1 + to_port = -1 + protocol = "icmp" + cidr_blocks = ["0.0.0.0/0"] + } +} +`, rName, ipDiscovery), + ) +} + +func testAccReplicationGroupConfig_networkType(rName, ipDiscovery, networkType string) string { + return acctest.ConfigCompose( + acctest.ConfigVPCWithSubnetsIPv6(rName, 1), + fmt.Sprintf(` +resource "aws_elasticache_replication_group" "test" { + replication_group_id = %[1]q + description = "test description" + node_type = "cache.t3.small" + num_cache_clusters = 1 + port = 6379 + subnet_group_name = aws_elasticache_subnet_group.test.name + ip_discovery = %[2]q + network_type = %[3]q + security_group_ids = [aws_security_group.test.id] + preferred_cache_cluster_azs = [data.aws_availability_zones.available.names[0]] +} + +resource "aws_elasticache_subnet_group" "test" { + name = %[1]q + subnet_ids = aws_subnet.test[*].id +} + +resource "aws_security_group" "test" { + name = %[1]q + description = "tf-test-security-group-descr" + vpc_id = aws_vpc.test.id + + ingress { + from_port = -1 + to_port = -1 + protocol = "icmp" + cidr_blocks = ["0.0.0.0/0"] + } +} +`, rName, ipDiscovery, networkType), + ) +} + func testAccReplicationGroupConfig_multiAZNoAutomaticFailover(rName string) string { return fmt.Sprintf(` resource "aws_elasticache_replication_group" "test" { From e286470ed100fd5041a97ba472c1988f2672bf65 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Fri, 20 Oct 2023 01:38:07 +0200 Subject: [PATCH 3/7] chore: add changelog entry --- .changelog/34019.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/34019.txt diff --git a/.changelog/34019.txt b/.changelog/34019.txt new file mode 100644 index 00000000000..17e94a6c879 --- /dev/null +++ b/.changelog/34019.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_elasticache_replication_group: Add `ip_discovery` and `network_type` arguments in support of ipv6. +``` From a17e1107dbc4ca0f1673b39a0eeb96e6ed2192af Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Fri, 20 Oct 2023 02:17:55 +0200 Subject: [PATCH 4/7] chore: set Redis Cluster Mode to Enabled --- .../elasticache/replication_group_test.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/internal/service/elasticache/replication_group_test.go b/internal/service/elasticache/replication_group_test.go index 53ad65e6e77..a0e6fba26cf 100644 --- a/internal/service/elasticache/replication_group_test.go +++ b/internal/service/elasticache/replication_group_test.go @@ -843,7 +843,7 @@ func TestAccElastiCacheReplicationGroup_networkType(t *testing.T) { CheckDestroy: testAccCheckReplicationGroupDestroy(ctx), Steps: []resource.TestStep{ { - Config: testAccReplicationGroupConfig_networkType(rName, "ipv6", "ipv6"), + Config: testAccReplicationGroupConfig_networkType(rName, "ipv6", "dual_stack"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "1"), @@ -3091,18 +3091,21 @@ resource "aws_security_group" "test" { func testAccReplicationGroupConfig_ipDiscovery(rName, ipDiscovery string) string { return acctest.ConfigCompose( - acctest.ConfigVPCWithSubnetsIPv6(rName, 1), + acctest.ConfigVPCWithSubnetsIPv6(rName, 2), fmt.Sprintf(` resource "aws_elasticache_replication_group" "test" { replication_group_id = %[1]q description = "test description" node_type = "cache.t3.small" - num_cache_clusters = 1 + num_node_groups = 2 + replicas_per_node_group = 1 port = 6379 + parameter_group_name = "default.redis7.cluster.on" + automatic_failover_enabled = true subnet_group_name = aws_elasticache_subnet_group.test.name ip_discovery = %[2]q + network_type = "dual_stack" security_group_ids = [aws_security_group.test.id] - preferred_cache_cluster_azs = [data.aws_availability_zones.available.names[0]] } resource "aws_elasticache_subnet_group" "test" { @@ -3128,19 +3131,21 @@ resource "aws_security_group" "test" { func testAccReplicationGroupConfig_networkType(rName, ipDiscovery, networkType string) string { return acctest.ConfigCompose( - acctest.ConfigVPCWithSubnetsIPv6(rName, 1), + acctest.ConfigVPCWithSubnetsIPv6(rName, 2), fmt.Sprintf(` resource "aws_elasticache_replication_group" "test" { replication_group_id = %[1]q description = "test description" node_type = "cache.t3.small" - num_cache_clusters = 1 + num_node_groups = 2 + replicas_per_node_group = 1 port = 6379 + parameter_group_name = "default.redis7.cluster.on" + automatic_failover_enabled = true subnet_group_name = aws_elasticache_subnet_group.test.name ip_discovery = %[2]q network_type = %[3]q security_group_ids = [aws_security_group.test.id] - preferred_cache_cluster_azs = [data.aws_availability_zones.available.names[0]] } resource "aws_elasticache_subnet_group" "test" { From 0630b721da3a19fda5fe0294a02cd56b3ae997c9 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Fri, 20 Oct 2023 02:27:08 +0200 Subject: [PATCH 5/7] chore: add extra properties to check on --- .../elasticache/replication_group_test.go | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/internal/service/elasticache/replication_group_test.go b/internal/service/elasticache/replication_group_test.go index a0e6fba26cf..13536d369e2 100644 --- a/internal/service/elasticache/replication_group_test.go +++ b/internal/service/elasticache/replication_group_test.go @@ -812,8 +812,15 @@ func TestAccElastiCacheReplicationGroup_ipDiscovery(t *testing.T) { Config: testAccReplicationGroupConfig_ipDiscovery(rName, "ipv6"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), - resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "1"), - resource.TestCheckResourceAttr(resourceName, "preferred_cache_cluster_azs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "port", "6379"), + resource.TestCheckResourceAttr(resourceName, "node_type", "cache.t3.small"), + resource.TestCheckResourceAttr(resourceName, "num_node_groups", "2"), + resource.TestCheckResourceAttr(resourceName, "replicas_per_node_group", "1"), + resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "4"), + resource.TestCheckResourceAttr(resourceName, "parameter_group_name", "default.redis7.cluster.on"), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "ip_discovery", "ipv6"), ), }, { @@ -846,8 +853,16 @@ func TestAccElastiCacheReplicationGroup_networkType(t *testing.T) { Config: testAccReplicationGroupConfig_networkType(rName, "ipv6", "dual_stack"), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckReplicationGroupExists(ctx, resourceName, &rg), - resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "1"), - resource.TestCheckResourceAttr(resourceName, "preferred_cache_cluster_azs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "port", "6379"), + resource.TestCheckResourceAttr(resourceName, "node_type", "cache.t3.small"), + resource.TestCheckResourceAttr(resourceName, "num_node_groups", "2"), + resource.TestCheckResourceAttr(resourceName, "replicas_per_node_group", "1"), + resource.TestCheckResourceAttr(resourceName, "num_cache_clusters", "4"), + resource.TestCheckResourceAttr(resourceName, "parameter_group_name", "default.redis7.cluster.on"), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "ip_discovery", "ipv6"), + resource.TestCheckResourceAttr(resourceName, "network_type", "dual_stack"), ), }, { From be30bcfc14ec2c250019accc7adebd49f5cccd22 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Fri, 20 Oct 2023 02:30:44 +0200 Subject: [PATCH 6/7] chore: lint acceptance tests --- .../elasticache/replication_group_test.go | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/internal/service/elasticache/replication_group_test.go b/internal/service/elasticache/replication_group_test.go index 13536d369e2..e79c6c9a4d9 100644 --- a/internal/service/elasticache/replication_group_test.go +++ b/internal/service/elasticache/replication_group_test.go @@ -3109,18 +3109,18 @@ func testAccReplicationGroupConfig_ipDiscovery(rName, ipDiscovery string) string acctest.ConfigVPCWithSubnetsIPv6(rName, 2), fmt.Sprintf(` resource "aws_elasticache_replication_group" "test" { - replication_group_id = %[1]q - description = "test description" - node_type = "cache.t3.small" - num_node_groups = 2 - replicas_per_node_group = 1 - port = 6379 - parameter_group_name = "default.redis7.cluster.on" - automatic_failover_enabled = true - subnet_group_name = aws_elasticache_subnet_group.test.name - ip_discovery = %[2]q - network_type = "dual_stack" - security_group_ids = [aws_security_group.test.id] + replication_group_id = %[1]q + description = "test description" + node_type = "cache.t3.small" + num_node_groups = 2 + replicas_per_node_group = 1 + port = 6379 + parameter_group_name = "default.redis7.cluster.on" + automatic_failover_enabled = true + subnet_group_name = aws_elasticache_subnet_group.test.name + ip_discovery = %[2]q + network_type = "dual_stack" + security_group_ids = [aws_security_group.test.id] } resource "aws_elasticache_subnet_group" "test" { @@ -3149,18 +3149,18 @@ func testAccReplicationGroupConfig_networkType(rName, ipDiscovery, networkType s acctest.ConfigVPCWithSubnetsIPv6(rName, 2), fmt.Sprintf(` resource "aws_elasticache_replication_group" "test" { - replication_group_id = %[1]q - description = "test description" - node_type = "cache.t3.small" - num_node_groups = 2 - replicas_per_node_group = 1 - port = 6379 - parameter_group_name = "default.redis7.cluster.on" - automatic_failover_enabled = true - subnet_group_name = aws_elasticache_subnet_group.test.name - ip_discovery = %[2]q - network_type = %[3]q - security_group_ids = [aws_security_group.test.id] + replication_group_id = %[1]q + description = "test description" + node_type = "cache.t3.small" + num_node_groups = 2 + replicas_per_node_group = 1 + port = 6379 + parameter_group_name = "default.redis7.cluster.on" + automatic_failover_enabled = true + subnet_group_name = aws_elasticache_subnet_group.test.name + ip_discovery = %[2]q + network_type = %[3]q + security_group_ids = [aws_security_group.test.id] } resource "aws_elasticache_subnet_group" "test" { From 0b791e0ae0b97b47fa9afc5dde33f1abaeaba30e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 20 Oct 2023 08:22:28 -0400 Subject: [PATCH 7/7] Documentation updates in correct place. --- .changelog/34019.txt | 2 +- .../cdktf/python/r/elasticache_replication_group.html.markdown | 2 -- website/docs/r/elasticache_replication_group.html.markdown | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changelog/34019.txt b/.changelog/34019.txt index 17e94a6c879..b7335d5f5af 100644 --- a/.changelog/34019.txt +++ b/.changelog/34019.txt @@ -1,3 +1,3 @@ ```release-note:enhancement -resource/aws_elasticache_replication_group: Add `ip_discovery` and `network_type` arguments in support of ipv6. +resource/aws_elasticache_replication_group: Add `ip_discovery` and `network_type` arguments ``` diff --git a/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown b/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown index c5cf7e556fa..2808fe732af 100644 --- a/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown +++ b/website/docs/cdktf/python/r/elasticache_replication_group.html.markdown @@ -240,14 +240,12 @@ The following arguments are optional: or the minor version can be unspecified which will use the latest version at creation time, e.g., `6.x`. Otherwise, specify the full version desired, e.g., `5.0.6`. The actual engine version used is returned in the attribute `engine_version_actual`, see [Attribute Reference](#attribute-reference) below. -* `ip_discovery` - (Optional) The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`. * `final_snapshot_identifier` - (Optional) The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. * `global_replication_group_id` - (Optional) The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If `global_replication_group_id` is set, the `num_node_groups` parameter cannot be set. * `kms_key_id` - (Optional) The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `at_rest_encryption_enabled = true`. * `log_delivery_configuration` - (Optional, Redis only) Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/slowlog) or Redis [Engine Log](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See the documentation on [Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See [Log Delivery Configuration](#log-delivery-configuration) below for more details. * `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` * `multi_az_enabled` - (Optional) Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automatic_failover_enabled` must also be enabled. Defaults to `false`. -* `network_type` - (Optional) The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dual_stack`. * `node_type` - (Optional) Instance class to be used. See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html). Required unless `global_replication_group_id` is set. Cannot be set if `global_replication_group_id` is set. * `notification_topic_arn` – (Optional) ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` * `num_cache_clusters` - (Optional) Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `num_node_groups`. Defaults to `1`. diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index fad9b77fb12..5a17794a4ab 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -188,10 +188,12 @@ The following arguments are optional: The actual engine version used is returned in the attribute `engine_version_actual`, see [Attribute Reference](#attribute-reference) below. * `final_snapshot_identifier` - (Optional) The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. * `global_replication_group_id` - (Optional) The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If `global_replication_group_id` is set, the `num_node_groups` parameter cannot be set. +* `ip_discovery` - (Optional) The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`. * `kms_key_id` - (Optional) The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `at_rest_encryption_enabled = true`. * `log_delivery_configuration` - (Optional, Redis only) Specifies the destination and format of Redis [SLOWLOG](https://redis.io/commands/slowlog) or Redis [Engine Log](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See the documentation on [Amazon ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Log_Delivery.html#Log_contents-engine-log). See [Log Delivery Configuration](#log-delivery-configuration) below for more details. * `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` * `multi_az_enabled` - (Optional) Specifies whether to enable Multi-AZ Support for the replication group. If `true`, `automatic_failover_enabled` must also be enabled. Defaults to `false`. +* `network_type` - (Optional) The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dual_stack`. * `node_type` - (Optional) Instance class to be used. See AWS documentation for information on [supported node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html). Required unless `global_replication_group_id` is set. Cannot be set if `global_replication_group_id` is set. * `notification_topic_arn` – (Optional) ARN of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` * `num_cache_clusters` - (Optional) Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `num_node_groups`. Defaults to `1`.