@@ -186,6 +186,49 @@ func TestAccMemorystoreInstance_updateDeletionProtection(t *testing.T) {
186
186
})
187
187
}
188
188
189
+ // Validate that node type is updated for the cluster
190
+ func TestAccMemorystoreInstance_updateNodeType (t * testing.T ) {
191
+ t .Parallel ()
192
+
193
+ name := fmt .Sprintf ("tf-test-%d" , acctest .RandInt (t ))
194
+
195
+ acctest .VcrTest (t , resource.TestCase {
196
+ PreCheck : func () { acctest .AccTestPreCheck (t ) },
197
+ ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
198
+ CheckDestroy : testAccCheckMemorystoreInstanceDestroyProducer (t ),
199
+ Steps : []resource.TestStep {
200
+ {
201
+ // create cluster with deletion protection true
202
+ Config : createOrUpdateMemorystoreInstance (& InstanceParams {
203
+ name : name ,
204
+ shardCount : 3 ,
205
+ zoneDistributionMode : "MULTI_ZONE" ,
206
+ nodeType : "HIGHMEM_MEDIUM" ,
207
+ }),
208
+ },
209
+ {
210
+ ResourceName : "google_memorystore_instance.test" ,
211
+ ImportState : true ,
212
+ ImportStateVerify : true ,
213
+ },
214
+ {
215
+ // update cluster with deletion protection false
216
+ Config : createOrUpdateMemorystoreInstance (& InstanceParams {
217
+ name : name ,
218
+ shardCount : 3 ,
219
+ zoneDistributionMode : "MULTI_ZONE" ,
220
+ nodeType : "STANDARD_SMALL" ,
221
+ }),
222
+ },
223
+ {
224
+ ResourceName : "google_memorystore_instance.test" ,
225
+ ImportState : true ,
226
+ ImportStateVerify : true ,
227
+ },
228
+ },
229
+ })
230
+ }
231
+
189
232
// Validate that persistence config is updated for the cluster
190
233
func TestAccMemorystoreInstance_updatePersistence (t * testing.T ) {
191
234
t .Parallel ()
0 commit comments