@@ -11,7 +11,7 @@ import (
11
11
"github.com/hashicorp/terraform-provider-google-beta/google-beta/acctest"
12
12
)
13
13
14
- func TestAccRedisCluster_createClusterWithNodeType (t * testing.T ) {
14
+ func TestAccRedisCluster_createUpdateClusterWithNodeType (t * testing.T ) {
15
15
16
16
t .Parallel ()
17
17
@@ -23,7 +23,7 @@ func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
23
23
CheckDestroy : testAccCheckRedisClusterDestroyProducer (t ),
24
24
Steps : []resource.TestStep {
25
25
{
26
- // create cluster with replica count 1
26
+ // create cluster with node type "REDIS_STANDARD_SMALL"
27
27
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 }),
28
28
},
29
29
{
@@ -32,9 +32,19 @@ func TestAccRedisCluster_createClusterWithNodeType(t *testing.T) {
32
32
ImportStateVerify : true ,
33
33
ImportStateVerifyIgnore : []string {"psc_configs" },
34
34
},
35
+ {
36
+ // update cluster with node type "REDIS_HIGHMEM_MEDIUM"
37
+ Config : createOrUpdateRedisCluster (& ClusterParams {name : name , replicaCount : 1 , shardCount : 3 , deletionProtectionEnabled : true , nodeType : "REDIS_HIGHMEM_MEDIUM" , zoneDistributionMode : "MULTI_ZONE" , maintenanceDay : "TUESDAY" , maintenanceHours : 2 , maintenanceMinutes : 0 , maintenanceSeconds : 0 , maintenanceNanos : 0 }),
38
+ },
39
+ {
40
+ ResourceName : "google_redis_cluster.test" ,
41
+ ImportState : true ,
42
+ ImportStateVerify : true ,
43
+ ImportStateVerifyIgnore : []string {"psc_configs" },
44
+ },
35
45
{
36
46
// clean up the resource
37
- 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 }),
47
+ 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 }),
38
48
},
39
49
},
40
50
})
0 commit comments