@@ -282,6 +282,32 @@ func resourceComputeDisk() *schema.Resource {
282
282
Optional : true ,
283
283
ForceNew : true ,
284
284
},
285
+ "disk_encryption_key" : {
286
+ Type : schema .TypeList ,
287
+ Optional : true ,
288
+ ForceNew : true ,
289
+ DiffSuppressFunc : diskEncryptionKeyDiffSuppress ,
290
+ MaxItems : 1 ,
291
+ Elem : & schema.Resource {
292
+ Schema : map [string ]* schema.Schema {
293
+ "raw_key" : {
294
+ Type : schema .TypeString ,
295
+ Optional : true ,
296
+ ForceNew : true ,
297
+ },
298
+ "sha256" : {
299
+ Type : schema .TypeString ,
300
+ Computed : true ,
301
+ },
302
+ },
303
+ },
304
+ },
305
+ "image" : {
306
+ Type : schema .TypeString ,
307
+ Optional : true ,
308
+ ForceNew : true ,
309
+ DiffSuppressFunc : diskImageDiffSuppress ,
310
+ },
285
311
"labels" : {
286
312
Type : schema .TypeMap ,
287
313
Optional : true ,
@@ -292,22 +318,8 @@ func resourceComputeDisk() *schema.Resource {
292
318
Computed : true ,
293
319
Optional : true ,
294
320
},
295
- "type" : {
296
- Type : schema .TypeString ,
297
- Optional : true ,
298
- ForceNew : true ,
299
- DiffSuppressFunc : compareSelfLinkOrResourceName ,
300
- Default : "pd-standard" ,
301
- },
302
- "image" : {
303
- Type : schema .TypeString ,
304
- Optional : true ,
305
- ForceNew : true ,
306
- DiffSuppressFunc : diskImageDiffSuppress ,
307
- },
308
- "zone" : {
321
+ "snapshot" : {
309
322
Type : schema .TypeString ,
310
- Computed : true ,
311
323
Optional : true ,
312
324
ForceNew : true ,
313
325
DiffSuppressFunc : compareSelfLinkOrResourceName ,
@@ -331,12 +343,11 @@ func resourceComputeDisk() *schema.Resource {
331
343
},
332
344
},
333
345
},
334
- "disk_encryption_key" : {
335
- Type : schema .TypeList ,
336
- Optional : true ,
337
- ForceNew : true ,
338
- DiffSuppressFunc : diskEncryptionKeyDiffSuppress ,
339
- MaxItems : 1 ,
346
+ "source_snapshot_encryption_key" : {
347
+ Type : schema .TypeList ,
348
+ Optional : true ,
349
+ ForceNew : true ,
350
+ MaxItems : 1 ,
340
351
Elem : & schema.Resource {
341
352
Schema : map [string ]* schema.Schema {
342
353
"raw_key" : {
@@ -351,30 +362,19 @@ func resourceComputeDisk() *schema.Resource {
351
362
},
352
363
},
353
364
},
354
- "snapshot " : {
365
+ "type " : {
355
366
Type : schema .TypeString ,
356
367
Optional : true ,
357
368
ForceNew : true ,
358
369
DiffSuppressFunc : compareSelfLinkOrResourceName ,
370
+ Default : "pd-standard" ,
359
371
},
360
- "source_snapshot_encryption_key" : {
361
- Type : schema .TypeList ,
362
- Optional : true ,
363
- ForceNew : true ,
364
- MaxItems : 1 ,
365
- Elem : & schema.Resource {
366
- Schema : map [string ]* schema.Schema {
367
- "raw_key" : {
368
- Type : schema .TypeString ,
369
- Optional : true ,
370
- ForceNew : true ,
371
- },
372
- "sha256" : {
373
- Type : schema .TypeString ,
374
- Computed : true ,
375
- },
376
- },
377
- },
372
+ "zone" : {
373
+ Type : schema .TypeString ,
374
+ Computed : true ,
375
+ Optional : true ,
376
+ ForceNew : true ,
377
+ DiffSuppressFunc : compareSelfLinkOrResourceName ,
378
378
},
379
379
"creation_timestamp" : {
380
380
Type : schema .TypeString ,
0 commit comments