forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestoreWorkload.yaml
More file actions
798 lines (797 loc) · 29.7 KB
/
Copy pathRestoreWorkload.yaml
File metadata and controls
798 lines (797 loc) · 29.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
---
# Copyright 2026 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: 'RestoreWorkload'
description: |
An imperative resource that triggers a GCBDR restoration event.
Creating this resource will initiate a restore operation from a specified backup.
The resource represents the restore operation and its result.
min_version: beta
# Immutable ensures any config change triggers a fresh restore rather than an invalid update
# TODO: Remove this once update operations are supported.
immutable: true
# Skip read since this is an imperative action resource, not a persistent resource
exclude_read: true
# Enable LRO polling for the background resource creation process
autogen_async: true
async:
actions: ['create']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
result:
resource_inside_response: true
custom_code:
custom_create: 'templates/terraform/custom_create/backup_dr_restore_workload.go.tmpl'
custom_delete: 'templates/terraform/custom_delete/backup_dr_restore_workload.go.tmpl'
examples:
- name: 'backup_dr_restore_workload_compute_instance_basic'
primary_resource_id: 'restore_compute_basic'
skip_test: true
test_env_vars:
project: 'PROJECT_NAME'
vars:
backup_vault_id: 'backup-vault'
data_source_id: 'data-source'
backup_id: 'backup'
backup_name: 'projects/my-project/locations/us-central1/backups/my-backup'
instance_name: 'restored-instance'
- name: 'backup_dr_restore_workload_compute_instance_full'
primary_resource_id: 'restore_compute_full'
skip_test: true
test_env_vars:
project: 'PROJECT_NAME'
vars:
backup_vault_id: 'backup-vault'
data_source_id: 'data-source'
backup_id: 'backup'
backup_name: 'projects/my-project/locations/us-central1/backups/my-backup'
instance_name: 'restored-instance-full'
- name: 'backup_dr_restore_workload_disk_basic'
primary_resource_id: 'restore_disk_basic'
skip_test: true
test_env_vars:
project: 'PROJECT_NAME'
vars:
backup_vault_id: 'backup-vault'
data_source_id: 'data-source'
backup_id: 'backup'
backup_name: 'projects/my-project/locations/us-central1/backups/my-backup'
disk_name: 'restored-disk'
- name: 'backup_dr_restore_workload_regional_disk'
primary_resource_id: 'restore_regional_disk'
skip_test: true
test_env_vars:
project: 'PROJECT_NAME'
vars:
backup_vault_id: 'backup-vault'
data_source_id: 'data-source'
backup_id: 'backup'
backup_name: 'projects/my-project/locations/us-central1/backups/my-backup'
disk_name: 'restored-regional-disk'
- name: 'backup_dr_restore_workload_without_delete'
primary_resource_id: 'restore_without_delete'
skip_test: true
test_env_vars:
project: 'PROJECT_NAME'
vars:
backup_vault_id: 'backup-vault'
data_source_id: 'data-source'
backup_id: 'backup'
backup_name: 'projects/my-project/locations/us-central1/backups/my-backup'
disk_name: 'persistent-disk'
parameters:
- name: 'location'
type: String
required: true
url_param_only: true
description: 'Required. The location for the backup vault.'
- name: 'backup_vault_id'
type: String
required: true
url_param_only: true
description: 'Required. The ID of the backup vault.'
- name: 'data_source_id'
type: String
required: true
url_param_only: true
description: 'Required. The ID of the data source.'
- name: 'backup_id'
type: String
required: true
url_param_only: true
description: 'Required. The ID of the backup to restore from.'
properties:
- name: 'name'
type: String
description: 'Required. The resource name of the backup instance.'
required: true
- name: 'requestId'
type: String
description: |
Optional. An optional request ID to identify requests. Specify a unique request ID
so that if you must retry your request, the server will know to ignore
the request if it has already been completed.
# --- Target Environments (oneof target_environment) ---
- name: 'computeInstanceTargetEnvironment'
type: NestedObject
description: 'Optional. The destination environment for GCE VM restoration.'
properties:
- name: 'project'
type: String
required: true
description: 'Required. Target project for the Compute Engine instance.'
- name: 'zone'
type: String
required: true
description: 'Required. The zone of the Compute Engine instance.'
- name: 'diskTargetEnvironment'
type: NestedObject
description: 'Optional. The destination environment for zonal disk restoration.'
properties:
- name: 'project'
type: String
required: true
description: 'Required. Target project for the disk.'
- name: 'zone'
type: String
required: true
description: 'Required. Target zone for the disk.'
- name: 'regionDiskTargetEnvironment'
type: NestedObject
description: 'Optional. The destination environment for regional disk restoration.'
properties:
- name: 'project'
type: String
required: true
description: 'Required. Target project for the disk.'
- name: 'region'
type: String
required: true
description: 'Required. Target region for the disk.'
- name: 'replicaZones'
type: Array
item_type:
type: String
required: true
description: 'Required. Target URLs of the replica zones for the disk.'
# --- Restore Properties (oneof instance_properties) ---
- name: 'computeInstanceRestoreProperties'
type: NestedObject
description: 'Optional. Compute Engine instance properties to be overridden during restore.'
properties:
- name: 'name'
type: String
required: true
description: 'Required. Name of the compute instance.'
- name: 'advancedMachineFeatures'
type: NestedObject
description: 'Optional. Controls for advanced machine-related behavior features.'
properties:
- name: 'enableNestedVirtualization'
type: Boolean
description: 'Optional. Whether to enable nested virtualization or not (default is false).'
- name: 'threadsPerCore'
type: Integer
description: 'Optional. The number of threads per physical core.'
- name: 'visibleCoreCount'
type: Integer
description: 'Optional. The number of physical cores to expose to an instance.'
- name: 'enableUefiNetworking'
type: Boolean
description: 'Optional. Whether to enable UEFI networking for instance creation.'
- name: 'canIpForward'
type: Boolean
description: 'Optional. Allows this instance to send and receive packets with non-matching destination or source IPs.'
- name: 'confidentialInstanceConfig'
type: NestedObject
description: 'Optional. Controls Confidential compute options on the instance.'
properties:
- name: 'enableConfidentialCompute'
type: Boolean
description: 'Optional. Defines whether the instance should have confidential compute enabled.'
- name: 'deletionProtection'
type: Boolean
description: 'Optional. Whether the resource should be protected against deletion.'
- name: 'description'
type: String
description: 'Optional. An optional description of this resource.'
- name: 'disks'
type: Array
description: 'Optional. Array of disks associated with this instance.'
item_type:
type: NestedObject
properties:
- name: 'initializeParams'
type: NestedObject
description: 'Optional. Specifies the parameters to initialize this disk.'
properties:
- name: 'diskName'
type: String
description: 'Optional. Specifies the disk name.'
- name: 'replicaZones'
type: Array
item_type:
type: String
description: 'Optional. URL of the zone where the disk should be created.'
- name: 'deviceName'
type: String
description: 'Optional. This is used as an identifier for the disks.'
- name: 'kind'
type: String
description: 'Optional. Type of the resource.'
- name: 'mode'
type: Enum
description: 'Optional. The mode in which to attach this disk.'
enum_values:
- 'DISK_MODE_UNSPECIFIED'
- 'READ_WRITE'
- 'READ_ONLY'
- 'LOCKED'
- name: 'source'
type: String
description: 'Optional. Specifies a valid partial or full URL to an existing Persistent Disk resource.'
- name: 'index'
type: Integer
description: 'Optional. A zero-based index to this disk, where 0 is reserved for the boot disk.'
- name: 'boot'
type: Boolean
description: 'Optional. Indicates that this is a boot disk.'
- name: 'autoDelete'
type: Boolean
description: 'Optional. Specifies whether the disk will be auto-deleted when the instance is deleted.'
- name: 'license'
type: Array
item_type:
type: String
description: 'Optional. Any valid publicly visible licenses.'
- name: 'diskInterface'
type: Enum
description: 'Optional. Specifies the disk interface to use for attaching this disk.'
enum_values:
- 'DISK_INTERFACE_UNSPECIFIED'
- 'SCSI'
- 'NVME'
- 'NVDIMM'
- 'ISCSI'
- name: 'guestOsFeature'
type: Array
description: 'Optional. A list of features to enable on the guest operating system.'
item_type:
type: NestedObject
properties:
- name: 'type'
type: Enum
description: 'Optional. The ID of a supported feature.'
enum_values:
- 'FEATURE_TYPE_UNSPECIFIED'
- 'VIRTIO_SCSI_MULTIQUEUE'
- 'WINDOWS'
- 'MULTI_IP_SUBNET'
- 'UEFI_COMPATIBLE'
- 'SECURE_BOOT'
- 'GVNIC'
- 'SEV_CAPABLE'
- 'BARE_METAL_LINUX_COMPATIBLE'
- 'SUSPEND_RESUME_COMPATIBLE'
- 'SEV_LIVE_MIGRATABLE'
- 'SEV_SNP_CAPABLE'
- 'TDX_CAPABLE'
- 'IDPF'
- 'SEV_LIVE_MIGRATABLE_V2'
- name: 'diskEncryptionKey'
type: NestedObject
description: 'Optional. Encrypts or decrypts a disk using a customer-supplied encryption key.'
properties:
- name: 'rawKey'
type: String
description: 'Optional. Specifies a 256-bit customer-supplied encryption key.'
- name: 'rsaEncryptedKey'
type: String
description: 'Optional. RSA-wrapped 2048-bit customer-supplied encryption key.'
- name: 'kmsKeyName'
type: String
description: 'Optional. The name of the encryption key that is stored in Google Cloud KMS.'
- name: 'kmsKeyServiceAccount'
type: String
description: 'Optional. The service account being used for the encryption request.'
- name: 'diskSizeGb'
type: Integer
description: 'Optional. The size of the disk in GB.'
- name: 'savedState'
type: Enum
description: 'Optional. Specifies the saved state of the disk.'
enum_values:
- 'DISK_SAVED_STATE_UNSPECIFIED'
- 'PRESERVED'
- name: 'diskType'
type: String
description: 'Output only. The URI of the disk type resource.'
- name: 'type'
type: Enum
description: 'Optional. Specifies the type of the disk.'
enum_values:
- 'DISK_TYPE_UNSPECIFIED'
- 'SCRATCH'
- 'PERSISTENT'
- name: 'displayDevice'
type: NestedObject
description: 'Optional. Enables display device for the instance.'
properties:
- name: 'enableDisplay'
type: Boolean
description: 'Optional. Enables display for the Compute Engine VM.'
- name: 'guestAccelerators'
type: Array
description: 'Optional. A list of the type and count of accelerator cards attached to the instance.'
item_type:
type: NestedObject
properties:
- name: 'acceleratorType'
type: String
description: 'Optional. Full or partial URL of the accelerator type resource.'
- name: 'acceleratorCount'
type: Integer
description: 'Optional. The number of the guest accelerator cards exposed to this instance.'
- name: 'hostname'
type: String
description: 'Optional. Specifies the hostname of the instance.'
- name: 'instanceEncryptionKey'
type: NestedObject
description: 'Optional. Encrypts suspended data for an instance with a customer-managed encryption key.'
properties:
- name: 'rawKey'
type: String
- name: 'rsaEncryptedKey'
type: String
- name: 'kmsKeyName'
type: String
- name: 'kmsKeyServiceAccount'
type: String
- name: 'keyRevocationActionType'
type: Enum
description: 'Optional. KeyRevocationActionType of the instance.'
enum_values:
- 'KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED'
- 'NONE'
- 'STOP'
- name: 'labels'
type: Map
key_name: key
value_type:
name: value
type: NestedObject
properties:
- name: 'value'
type: String
description: 'Optional. Labels to apply to this instance.'
- name: 'machineType'
type: String
description: 'Optional. Full or partial URL of the machine type resource to use for this instance.'
- name: 'metadata'
type: NestedObject
description: 'Optional. This includes custom metadata and predefined keys.'
properties:
- name: 'items'
type: Array
item_type:
type: NestedObject
properties:
- name: 'key'
type: String
- name: 'value'
type: String
- name: 'minCpuPlatform'
type: String
description: 'Optional. Minimum CPU platform to use for this instance.'
- name: 'networkInterfaces'
type: Array
description: 'Optional. An array of network configurations for this instance.'
item_type:
type: NestedObject
properties:
- name: 'network'
type: String
description: 'Optional. URL of the VPC network resource for this instance.'
- name: 'subnetwork'
type: String
description: 'Optional. The URL of the Subnetwork resource for this instance.'
- name: 'ipAddress'
type: String
description: 'Optional. An IPv4 internal IP address to assign to the instance.'
- name: 'ipv6Address'
type: String
description: 'Optional. An IPv6 internal network address for this network interface.'
- name: 'internalIpv6PrefixLength'
type: Integer
description: 'Optional. The prefix length of the primary internal IPv6 range.'
- name: 'accessConfigs'
type: Array
item_type:
type: NestedObject
properties:
- name: 'type'
type: Enum
description: 'Optional. The type of configuration.'
enum_values:
- 'ACCESS_TYPE_UNSPECIFIED'
- 'ONE_TO_ONE_NAT'
- 'DIRECT_IPV6'
- name: 'name'
type: String
description: 'Optional. The name of this access configuration.'
- name: 'externalIp'
type: String
- name: 'externalIpv6'
type: String
- name: 'externalIpv6PrefixLength'
type: Integer
- name: 'setPublicPtr'
type: Boolean
- name: 'publicPtrDomainName'
type: String
- name: 'networkTier'
type: Enum
enum_values:
- 'NETWORK_TIER_UNSPECIFIED'
- 'PREMIUM'
- 'STANDARD'
- name: 'ipv6AccessConfigs'
type: Array
item_type:
type: NestedObject
properties:
- name: 'type'
type: Enum
description: 'Optional. The type of configuration.'
enum_values:
- 'ACCESS_TYPE_UNSPECIFIED'
- 'ONE_TO_ONE_NAT'
- 'DIRECT_IPV6'
- name: 'name'
type: String
description: 'Optional. The name of this access configuration.'
- name: 'externalIp'
type: String
- name: 'externalIpv6'
type: String
- name: 'externalIpv6PrefixLength'
type: Integer
- name: 'setPublicPtr'
type: Boolean
- name: 'publicPtrDomainName'
type: String
- name: 'networkTier'
type: Enum
enum_values:
- 'NETWORK_TIER_UNSPECIFIED'
- 'PREMIUM'
- 'STANDARD'
- name: 'aliasIpRanges'
type: Array
item_type:
type: NestedObject
properties:
- name: 'ipCidrRange'
type: String
- name: 'subnetworkRangeName'
type: String
- name: 'stackType'
type: Enum
enum_values:
- 'STACK_TYPE_UNSPECIFIED'
- 'IPV4_ONLY'
- 'IPV4_IPV6'
- name: 'ipv6AccessType'
type: Enum
enum_values:
- 'UNSPECIFIED_IPV6_ACCESS_TYPE'
- 'INTERNAL'
- 'EXTERNAL'
- name: 'queueCount'
type: Integer
- name: 'nicType'
type: Enum
enum_values:
- 'NIC_TYPE_UNSPECIFIED'
- 'VIRTIO_NET'
- 'GVNIC'
- name: 'networkAttachment'
type: String
- name: 'networkPerformanceConfig'
type: NestedObject
description: 'Optional. Configure network performance such as egress bandwidth tier.'
properties:
- name: 'totalEgressBandwidthTier'
type: Enum
enum_values:
- 'TIER_UNSPECIFIED'
- 'DEFAULT'
- 'TIER_1'
- name: 'params'
type: NestedObject
description: 'Input only. Additional params passed with the request.'
properties:
- name: 'resourceManagerTags'
type: Map
key_name: key
value_type:
name: value
type: NestedObject
properties:
- name: 'value'
type: String
- name: 'privateIpv6GoogleAccess'
type: Enum
description: 'Optional. The private IPv6 google access type for the VM.'
enum_values:
- 'INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED'
- 'INHERIT_FROM_SUBNETWORK'
- 'ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE'
- 'ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE'
- name: 'allocationAffinity'
type: NestedObject
description: 'Optional. Specifies the reservations that this instance can consume from.'
properties:
- name: 'consumeAllocationType'
type: Enum
enum_values:
- 'TYPE_UNSPECIFIED'
- 'NO_RESERVATION'
- 'ANY_RESERVATION'
- 'SPECIFIC_RESERVATION'
- name: 'key'
type: String
- name: 'values'
type: Array
item_type:
type: String
- name: 'resourcePolicies'
type: Array
item_type:
type: String
description: 'Optional. Resource policies applied to this instance.'
- name: 'scheduling'
type: NestedObject
description: 'Optional. Sets the scheduling options for this instance.'
properties:
- name: 'onHostMaintenance'
type: Enum
enum_values:
- 'ON_HOST_MAINTENANCE_UNSPECIFIED'
- 'TERMINATE'
- 'MIGRATE'
- name: 'automaticRestart'
type: Boolean
- name: 'preemptible'
type: Boolean
- name: 'nodeAffinities'
type: Array
item_type:
type: NestedObject
properties:
- name: 'key'
type: String
- name: 'operator'
type: Enum
enum_values:
- 'OPERATOR_UNSPECIFIED'
- 'IN'
- 'NOT_IN'
- name: 'values'
type: Array
item_type:
type: String
- name: 'minNodeCpus'
type: Integer
- name: 'provisioningModel'
type: Enum
enum_values:
- 'PROVISIONING_MODEL_UNSPECIFIED'
- 'STANDARD'
- 'SPOT'
- name: 'instanceTerminationAction'
type: Enum
enum_values:
- 'INSTANCE_TERMINATION_ACTION_UNSPECIFIED'
- 'DELETE'
- 'STOP'
- name: 'localSsdRecoveryTimeout'
type: NestedObject
properties:
- name: 'seconds'
type: Integer
- name: 'nanos'
type: Integer
- name: 'maxRunDuration'
type: NestedObject
properties:
- name: 'seconds'
type: Integer
- name: 'nanos'
type: Integer
- name: 'terminationTime'
type: String
- name: 'serviceAccounts'
type: Array
description: 'Optional. A list of service accounts, with their specified scopes, authorized for this instance.'
item_type:
type: NestedObject
properties:
- name: 'email'
type: String
- name: 'scopes'
type: Array
item_type:
type: String
- name: 'shieldedInstanceConfig'
type: NestedObject
description: 'Optional. Controls Shielded compute options on the instance.'
properties:
- name: 'enableSecureBoot'
type: Boolean
- name: 'enableVtpm'
type: Boolean
- name: 'enableIntegrityMonitoring'
type: Boolean
- name: 'tags'
type: NestedObject
description: 'Optional. Tags to apply to this instance.'
properties:
- name: 'items'
type: Array
item_type:
type: String
- name: 'diskRestoreProperties'
type: NestedObject
description: 'Optional. Disk properties to be overridden during restore.'
properties:
- name: 'name'
type: String
required: true
description: 'Required. Name of the disk.'
- name: 'description'
type: String
description: 'Optional. An optional description of this resource.'
- name: 'sizeGb'
type: Integer
required: true
description: 'Required. The size of the disk in GB.'
- name: 'licenses'
type: Array
item_type:
type: String
description: 'Optional. A list of publicly available licenses that are applicable to this backup.'
- name: 'guestOsFeature'
type: Array
description: 'Optional. A list of features to enable in the guest operating system.'
item_type:
type: NestedObject
properties:
- name: 'type'
type: Enum
enum_values:
- 'FEATURE_TYPE_UNSPECIFIED'
- 'VIRTIO_SCSI_MULTIQUEUE'
- 'WINDOWS'
- 'MULTI_IP_SUBNET'
- 'UEFI_COMPATIBLE'
- 'SECURE_BOOT'
- 'GVNIC'
- 'SEV_CAPABLE'
- 'BARE_METAL_LINUX_COMPATIBLE'
- 'SUSPEND_RESUME_COMPATIBLE'
- 'SEV_LIVE_MIGRATABLE'
- 'SEV_SNP_CAPABLE'
- 'TDX_CAPABLE'
- 'IDPF'
- 'SEV_LIVE_MIGRATABLE_V2'
- name: 'diskEncryptionKey'
type: NestedObject
description: 'Optional. Encrypts the disk using a customer-supplied encryption key.'
properties:
- name: 'rawKey'
type: String
- name: 'rsaEncryptedKey'
type: String
- name: 'kmsKeyName'
type: String
- name: 'kmsKeyServiceAccount'
type: String
- name: 'physicalBlockSizeBytes'
type: Integer
description: 'Optional. Physical block size of the persistent disk, in bytes.'
- name: 'provisionedIops'
type: Integer
description: 'Optional. Indicates how many IOPS to provision for the disk.'
- name: 'provisionedThroughput'
type: Integer
description: 'Optional. Indicates how much throughput to provision for the disk.'
- name: 'enableConfidentialCompute'
type: Boolean
description: 'Optional. Indicates whether this disk is using confidential compute mode.'
- name: 'storagePool'
type: String
description: 'Optional. The storage pool in which the new disk is created.'
- name: 'accessMode'
type: Enum
description: 'Optional. The access mode of the disk.'
enum_values:
- 'READ_WRITE_SINGLE'
- 'READ_WRITE_MANY'
- 'READ_ONLY_MANY'
- name: 'architecture'
type: Enum
description: 'Optional. The architecture of the source disk.'
enum_values:
- 'ARCHITECTURE_UNSPECIFIED'
- 'X86_64'
- 'ARM64'
- name: 'resourcePolicy'
type: Array
item_type:
type: String
description: 'Optional. Resource policies applied to this disk.'
- name: 'type'
type: String
required: true
description: 'Required. URL of the disk type resource describing which disk type to use.'
- name: 'labels'
type: Map
key_name: key
value_type:
name: value
type: NestedObject
properties:
- name: 'value'
type: String
description: 'Optional. Labels to apply to this disk.'
- name: 'resourceManagerTags'
type: Map
key_name: key
value_type:
name: value
type: NestedObject
properties:
- name: 'value'
type: String
description: 'Optional. Resource manager tags to be bound to the disk.'
- name: 'clearOverridesFieldMask'
type: String
description: 'Optional. A field mask used to clear server-side default values during restore.'
# --- Terraform Specific ---
- name: 'deleteRestoredInstance'
type: Boolean
default_value: true
description: |
Optional. If true (default), running terraform destroy will delete the live resource in GCP.
If false, only the restore record is removed from the state, leaving the resource active.
# --- Output (RestoreBackupResponse) ---
- name: 'targetResource'
type: NestedObject
output: true
description: 'Output only. Details of the target resource created/modified as part of restore.'
properties:
- name: 'gcpResource'
type: NestedObject
description: 'Output only. Details of the native Google Cloud resource created as part of restore.'
properties:
- name: 'gcpResourcename'
type: String
description: 'Output only. Name of the Google Cloud resource.'
- name: 'location'
type: String
description: 'Output only. Location of the resource.'
- name: 'type'
type: String
description: 'Output only. Type of the resource.'