@@ -10,7 +10,7 @@ import (
10
10
"github.com/hashicorp/terraform-provider-google/google/acctest"
11
11
)
12
12
13
- func TestAccRedisCluster_createClusterWithNodeType (t *testing.T) {
13
+ func TestAccRedisCluster_createUpdateClusterWithNodeType (t *testing.T) {
14
14
15
15
t.Parallel()
16
16
@@ -22,8 +22,18 @@ func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
22
22
CheckDestroy: testAccCheckRedisClusterDestroyProducer(t),
23
23
Steps: []resource.TestStep{
24
24
{
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}),
27
37
},
28
38
{
29
39
ResourceName: "google_redis_cluster.test",
@@ -33,7 +43,7 @@ func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
33
43
},
34
44
{
35
45
// 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}),
37
47
},
38
48
},
39
49
})
0 commit comments