Skip to content

Commit 8bc4bdb

Browse files
Remove immutable annotation from nodeType to support vertical scaling.
1 parent 634b382 commit 8bc4bdb

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

mmv1/products/redis/Cluster.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ properties:
279279
The nodeType for the Redis cluster.
280280
If not provided, REDIS_HIGHMEM_MEDIUM will be used as default
281281
required: false
282-
immutable: true
283282
default_from_api: true
284283
enum_values:
285284
- 'REDIS_SHARED_CORE_NANO'

mmv1/third_party/terraform/services/redis/resource_redis_cluster_test.go.tmpl

+14-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/hashicorp/terraform-provider-google/google/acctest"
1111
)
1212

13-
func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
13+
func TestAccRedisCluster_createUpdateClusterWithNodeType(t *testing.T) {
1414

1515
t.Parallel()
1616

@@ -22,8 +22,18 @@ func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
2222
CheckDestroy: testAccCheckRedisClusterDestroyProducer(t),
2323
Steps: []resource.TestStep{
2424
{
25-
// create cluster with replica count 1
26-
Config: createOrUpdateRedisCluster(&ClusterParams{name: name, replicaCount: 1, shardCount: 3, deletionProtectionEnabled: true, nodeType: "REDIS_STANDARD_SMALL", zoneDistributionMode: "MULTI_ZONE", maintenanceDay: "TUESDAY", maintenanceHours: 2, maintenanceMinutes: 0, maintenanceSeconds: 0, maintenanceNanos: 0}),
25+
// create cluster with node type "REDIS_STANDARD_SMALL"
26+
Config: createOrUpdateRedisCluster(&ClusterParams{name: name, replicaCount: 1, shardCount: 3, deletionProtectionEnabled: false, nodeType: "REDIS_STANDARD_SMALL", zoneDistributionMode: "MULTI_ZONE", maintenanceDay: "TUESDAY", maintenanceHours: 2, maintenanceMinutes: 0, maintenanceSeconds: 0, maintenanceNanos: 0}),
27+
},
28+
{
29+
ResourceName: "google_redis_cluster.test",
30+
ImportState: true,
31+
ImportStateVerify: true,
32+
ImportStateVerifyIgnore: []string{"psc_configs"},
33+
},
34+
{
35+
// update cluster with node type "REDIS_HIGHMEM_MEDIUM"
36+
Config: createOrUpdateRedisCluster(&ClusterParams{name: name, replicaCount: 1, shardCount: 3, deletionProtectionEnabled: false, nodeType: "REDIS_HIGHMEM_MEDIUM", zoneDistributionMode: "MULTI_ZONE", maintenanceDay: "TUESDAY", maintenanceHours: 2, maintenanceMinutes: 0, maintenanceSeconds: 0, maintenanceNanos: 0}),
2737
},
2838
{
2939
ResourceName: "google_redis_cluster.test",
@@ -33,7 +43,7 @@ func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
3343
},
3444
{
3545
// clean up the resource
36-
Config: createOrUpdateRedisCluster(&ClusterParams{name: name, replicaCount: 1, shardCount: 3, deletionProtectionEnabled: false, nodeType: "REDIS_STANDARD_SMALL", zoneDistributionMode: "MULTI_ZONE", maintenanceDay: "TUESDAY", maintenanceHours: 2, maintenanceMinutes: 0, maintenanceSeconds: 0, maintenanceNanos: 0}),
46+
Config: createOrUpdateRedisCluster(&ClusterParams{name: name, replicaCount: 1, shardCount: 3, deletionProtectionEnabled: false, nodeType: "REDIS_HIGHMEM_MEDIUM", zoneDistributionMode: "MULTI_ZONE", maintenanceDay: "TUESDAY", maintenanceHours: 2, maintenanceMinutes: 0, maintenanceSeconds: 0, maintenanceNanos: 0}),
3747
},
3848
},
3949
})

0 commit comments

Comments
 (0)