/
regionDisk.go
670 lines (589 loc) · 61.1 KB
/
regionDisk.go
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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package alpha
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a persistent regional disk in the specified project using the data included in the request.
type RegionDisk struct {
pulumi.CustomResourceState
// The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types.
AccessMode pulumi.StringOutput `pulumi:"accessMode"`
// The architecture of the disk. Valid values are ARM64 or X86_64.
Architecture pulumi.StringOutput `pulumi:"architecture"`
// Disk asynchronously replicated into this disk.
AsyncPrimaryDisk DiskAsyncReplicationResponseOutput `pulumi:"asyncPrimaryDisk"`
// A list of disks this disk is asynchronously replicated to.
AsyncSecondaryDisks pulumi.StringMapOutput `pulumi:"asyncSecondaryDisks"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringOutput `pulumi:"description"`
// Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later.
DiskEncryptionKey CustomerEncryptionKeyResponseOutput `pulumi:"diskEncryptionKey"`
// Whether this disk is using confidential compute mode.
EnableConfidentialCompute pulumi.BoolOutput `pulumi:"enableConfidentialCompute"`
// Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
EraseWindowsVssSignature pulumi.BoolOutput `pulumi:"eraseWindowsVssSignature"`
// A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GuestOsFeatures GuestOsFeatureResponseArrayOutput `pulumi:"guestOsFeatures"`
// [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
//
// Deprecated: [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Interface pulumi.StringOutput `pulumi:"interface"`
// Type of the resource. Always compute#disk for disks.
Kind pulumi.StringOutput `pulumi:"kind"`
// A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk.
LabelFingerprint pulumi.StringOutput `pulumi:"labelFingerprint"`
// Labels to apply to this disk. These can be later modified by the setLabels method.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// Last attach timestamp in RFC3339 text format.
LastAttachTimestamp pulumi.StringOutput `pulumi:"lastAttachTimestamp"`
// Last detach timestamp in RFC3339 text format.
LastDetachTimestamp pulumi.StringOutput `pulumi:"lastDetachTimestamp"`
// Integer license codes indicating which licenses are attached to this disk.
LicenseCodes pulumi.StringArrayOutput `pulumi:"licenseCodes"`
// A list of publicly visible licenses. Reserved for Google's use.
Licenses pulumi.StringArrayOutput `pulumi:"licenses"`
// An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
LocationHint pulumi.StringOutput `pulumi:"locationHint"`
// The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false
Locked pulumi.BoolOutput `pulumi:"locked"`
// Indicates whether or not the disk can be read/write attached to more than one instance.
MultiWriter pulumi.BoolOutput `pulumi:"multiWriter"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringOutput `pulumi:"name"`
// Internal use only.
Options pulumi.StringOutput `pulumi:"options"`
// Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
Params DiskParamsResponseOutput `pulumi:"params"`
// Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
PhysicalBlockSizeBytes pulumi.StringOutput `pulumi:"physicalBlockSizeBytes"`
Project pulumi.StringOutput `pulumi:"project"`
// Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.
ProvisionedIops pulumi.StringOutput `pulumi:"provisionedIops"`
// Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be between 1 and 7,124.
ProvisionedThroughput pulumi.StringOutput `pulumi:"provisionedThroughput"`
Region pulumi.StringOutput `pulumi:"region"`
// URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
ReplicaZones pulumi.StringArrayOutput `pulumi:"replicaZones"`
// 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. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrOutput `pulumi:"requestId"`
// Resource policies applied to this disk for automatic snapshot creations.
ResourcePolicies pulumi.StringArrayOutput `pulumi:"resourcePolicies"`
// Status information for the disk resource.
ResourceStatus DiskResourceStatusResponseOutput `pulumi:"resourceStatus"`
// Reserved for future use.
SatisfiesPzs pulumi.BoolOutput `pulumi:"satisfiesPzs"`
// Server-defined fully-qualified URL for this resource.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// Server-defined URL for this resource's resource id.
SelfLinkWithId pulumi.StringOutput `pulumi:"selfLinkWithId"`
// Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.
SizeGb pulumi.StringOutput `pulumi:"sizeGb"`
// URL of the DiskConsistencyGroupPolicy for a secondary disk that was created using a consistency group.
SourceConsistencyGroupPolicy pulumi.StringOutput `pulumi:"sourceConsistencyGroupPolicy"`
// ID of the DiskConsistencyGroupPolicy for a secondary disk that was created using a consistency group.
SourceConsistencyGroupPolicyId pulumi.StringOutput `pulumi:"sourceConsistencyGroupPolicyId"`
// The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk
SourceDisk pulumi.StringOutput `pulumi:"sourceDisk"`
// The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used.
SourceDiskId pulumi.StringOutput `pulumi:"sourceDiskId"`
// Source image to restore onto a disk. This field is optional.
SourceImage pulumi.StringOutput `pulumi:"sourceImage"`
// The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
SourceImageEncryptionKey CustomerEncryptionKeyResponseOutput `pulumi:"sourceImageEncryptionKey"`
// The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
SourceImageId pulumi.StringOutput `pulumi:"sourceImageId"`
// The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot
SourceInstantSnapshot pulumi.StringOutput `pulumi:"sourceInstantSnapshot"`
// The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
SourceInstantSnapshotId pulumi.StringOutput `pulumi:"sourceInstantSnapshotId"`
// The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project /global/snapshots/snapshot - projects/project/global/snapshots/snapshot - global/snapshots/snapshot
SourceSnapshot pulumi.StringOutput `pulumi:"sourceSnapshot"`
// The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
SourceSnapshotEncryptionKey CustomerEncryptionKeyResponseOutput `pulumi:"sourceSnapshotEncryptionKey"`
// The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
SourceSnapshotId pulumi.StringOutput `pulumi:"sourceSnapshotId"`
// The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
SourceStorageObject pulumi.StringOutput `pulumi:"sourceStorageObject"`
// The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is ready for use. - DELETING: Disk is deleting.
Status pulumi.StringOutput `pulumi:"status"`
// The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool
StoragePool pulumi.StringOutput `pulumi:"storagePool"`
// [Deprecated] Storage type of the persistent disk.
//
// Deprecated: [Deprecated] Storage type of the persistent disk.
StorageType pulumi.StringOutput `pulumi:"storageType"`
// URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types.
Type pulumi.StringOutput `pulumi:"type"`
// A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
UserLicenses pulumi.StringArrayOutput `pulumi:"userLicenses"`
// Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
Users pulumi.StringArrayOutput `pulumi:"users"`
// URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Zone pulumi.StringOutput `pulumi:"zone"`
}
// NewRegionDisk registers a new resource with the given unique name, arguments, and options.
func NewRegionDisk(ctx *pulumi.Context,
name string, args *RegionDiskArgs, opts ...pulumi.ResourceOption) (*RegionDisk, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"project",
"region",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RegionDisk
err := ctx.RegisterResource("google-native:compute/alpha:RegionDisk", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRegionDisk gets an existing RegionDisk resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetRegionDisk(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RegionDiskState, opts ...pulumi.ResourceOption) (*RegionDisk, error) {
var resource RegionDisk
err := ctx.ReadResource("google-native:compute/alpha:RegionDisk", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RegionDisk resources.
type regionDiskState struct {
}
type RegionDiskState struct {
}
func (RegionDiskState) ElementType() reflect.Type {
return reflect.TypeOf((*regionDiskState)(nil)).Elem()
}
type regionDiskArgs struct {
// The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types.
AccessMode *RegionDiskAccessMode `pulumi:"accessMode"`
// The architecture of the disk. Valid values are ARM64 or X86_64.
Architecture *RegionDiskArchitecture `pulumi:"architecture"`
// Disk asynchronously replicated into this disk.
AsyncPrimaryDisk *DiskAsyncReplication `pulumi:"asyncPrimaryDisk"`
// An optional description of this resource. Provide this property when you create the resource.
Description *string `pulumi:"description"`
// Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later.
DiskEncryptionKey *CustomerEncryptionKey `pulumi:"diskEncryptionKey"`
// Whether this disk is using confidential compute mode.
EnableConfidentialCompute *bool `pulumi:"enableConfidentialCompute"`
// Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
EraseWindowsVssSignature *bool `pulumi:"eraseWindowsVssSignature"`
// A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GuestOsFeatures []GuestOsFeature `pulumi:"guestOsFeatures"`
// [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
//
// Deprecated: [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Interface *RegionDiskInterface `pulumi:"interface"`
// Labels to apply to this disk. These can be later modified by the setLabels method.
Labels map[string]string `pulumi:"labels"`
// Integer license codes indicating which licenses are attached to this disk.
LicenseCodes []string `pulumi:"licenseCodes"`
// A list of publicly visible licenses. Reserved for Google's use.
Licenses []string `pulumi:"licenses"`
// An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
LocationHint *string `pulumi:"locationHint"`
// Indicates whether or not the disk can be read/write attached to more than one instance.
MultiWriter *bool `pulumi:"multiWriter"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name *string `pulumi:"name"`
// Internal use only.
Options *string `pulumi:"options"`
// Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
Params *DiskParams `pulumi:"params"`
// Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
PhysicalBlockSizeBytes *string `pulumi:"physicalBlockSizeBytes"`
Project *string `pulumi:"project"`
// Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.
ProvisionedIops *string `pulumi:"provisionedIops"`
// Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be between 1 and 7,124.
ProvisionedThroughput *string `pulumi:"provisionedThroughput"`
Region string `pulumi:"region"`
// URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
ReplicaZones []string `pulumi:"replicaZones"`
// 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. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId *string `pulumi:"requestId"`
// Resource policies applied to this disk for automatic snapshot creations.
ResourcePolicies []string `pulumi:"resourcePolicies"`
// Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.
SizeGb *string `pulumi:"sizeGb"`
// The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk
SourceDisk *string `pulumi:"sourceDisk"`
// The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family
SourceImage *string `pulumi:"sourceImage"`
// The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
SourceImageEncryptionKey *CustomerEncryptionKey `pulumi:"sourceImageEncryptionKey"`
// The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot
SourceInstantSnapshot *string `pulumi:"sourceInstantSnapshot"`
// The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project /global/snapshots/snapshot - projects/project/global/snapshots/snapshot - global/snapshots/snapshot
SourceSnapshot *string `pulumi:"sourceSnapshot"`
// The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
SourceSnapshotEncryptionKey *CustomerEncryptionKey `pulumi:"sourceSnapshotEncryptionKey"`
// The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
SourceStorageObject *string `pulumi:"sourceStorageObject"`
// The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool
StoragePool *string `pulumi:"storagePool"`
// [Deprecated] Storage type of the persistent disk.
//
// Deprecated: [Deprecated] Storage type of the persistent disk.
StorageType *RegionDiskStorageType `pulumi:"storageType"`
// URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types.
Type *string `pulumi:"type"`
// A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
UserLicenses []string `pulumi:"userLicenses"`
}
// The set of arguments for constructing a RegionDisk resource.
type RegionDiskArgs struct {
// The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types.
AccessMode RegionDiskAccessModePtrInput
// The architecture of the disk. Valid values are ARM64 or X86_64.
Architecture RegionDiskArchitecturePtrInput
// Disk asynchronously replicated into this disk.
AsyncPrimaryDisk DiskAsyncReplicationPtrInput
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringPtrInput
// Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later.
DiskEncryptionKey CustomerEncryptionKeyPtrInput
// Whether this disk is using confidential compute mode.
EnableConfidentialCompute pulumi.BoolPtrInput
// Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
EraseWindowsVssSignature pulumi.BoolPtrInput
// A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
GuestOsFeatures GuestOsFeatureArrayInput
// [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
//
// Deprecated: [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Interface RegionDiskInterfacePtrInput
// Labels to apply to this disk. These can be later modified by the setLabels method.
Labels pulumi.StringMapInput
// Integer license codes indicating which licenses are attached to this disk.
LicenseCodes pulumi.StringArrayInput
// A list of publicly visible licenses. Reserved for Google's use.
Licenses pulumi.StringArrayInput
// An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
LocationHint pulumi.StringPtrInput
// Indicates whether or not the disk can be read/write attached to more than one instance.
MultiWriter pulumi.BoolPtrInput
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringPtrInput
// Internal use only.
Options pulumi.StringPtrInput
// Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
Params DiskParamsPtrInput
// Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
PhysicalBlockSizeBytes pulumi.StringPtrInput
Project pulumi.StringPtrInput
// Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.
ProvisionedIops pulumi.StringPtrInput
// Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be between 1 and 7,124.
ProvisionedThroughput pulumi.StringPtrInput
Region pulumi.StringInput
// URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
ReplicaZones pulumi.StringArrayInput
// 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. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrInput
// Resource policies applied to this disk for automatic snapshot creations.
ResourcePolicies pulumi.StringArrayInput
// Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.
SizeGb pulumi.StringPtrInput
// The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk
SourceDisk pulumi.StringPtrInput
// The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family
SourceImage pulumi.StringPtrInput
// The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
SourceImageEncryptionKey CustomerEncryptionKeyPtrInput
// The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot
SourceInstantSnapshot pulumi.StringPtrInput
// The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project /global/snapshots/snapshot - projects/project/global/snapshots/snapshot - global/snapshots/snapshot
SourceSnapshot pulumi.StringPtrInput
// The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
SourceSnapshotEncryptionKey CustomerEncryptionKeyPtrInput
// The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
SourceStorageObject pulumi.StringPtrInput
// The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool
StoragePool pulumi.StringPtrInput
// [Deprecated] Storage type of the persistent disk.
//
// Deprecated: [Deprecated] Storage type of the persistent disk.
StorageType RegionDiskStorageTypePtrInput
// URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types.
Type pulumi.StringPtrInput
// A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
UserLicenses pulumi.StringArrayInput
}
func (RegionDiskArgs) ElementType() reflect.Type {
return reflect.TypeOf((*regionDiskArgs)(nil)).Elem()
}
type RegionDiskInput interface {
pulumi.Input
ToRegionDiskOutput() RegionDiskOutput
ToRegionDiskOutputWithContext(ctx context.Context) RegionDiskOutput
}
func (*RegionDisk) ElementType() reflect.Type {
return reflect.TypeOf((**RegionDisk)(nil)).Elem()
}
func (i *RegionDisk) ToRegionDiskOutput() RegionDiskOutput {
return i.ToRegionDiskOutputWithContext(context.Background())
}
func (i *RegionDisk) ToRegionDiskOutputWithContext(ctx context.Context) RegionDiskOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegionDiskOutput)
}
type RegionDiskOutput struct{ *pulumi.OutputState }
func (RegionDiskOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RegionDisk)(nil)).Elem()
}
func (o RegionDiskOutput) ToRegionDiskOutput() RegionDiskOutput {
return o
}
func (o RegionDiskOutput) ToRegionDiskOutputWithContext(ctx context.Context) RegionDiskOutput {
return o
}
// The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk types.
func (o RegionDiskOutput) AccessMode() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.AccessMode }).(pulumi.StringOutput)
}
// The architecture of the disk. Valid values are ARM64 or X86_64.
func (o RegionDiskOutput) Architecture() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Architecture }).(pulumi.StringOutput)
}
// Disk asynchronously replicated into this disk.
func (o RegionDiskOutput) AsyncPrimaryDisk() DiskAsyncReplicationResponseOutput {
return o.ApplyT(func(v *RegionDisk) DiskAsyncReplicationResponseOutput { return v.AsyncPrimaryDisk }).(DiskAsyncReplicationResponseOutput)
}
// A list of disks this disk is asynchronously replicated to.
func (o RegionDiskOutput) AsyncSecondaryDisks() pulumi.StringMapOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringMapOutput { return v.AsyncSecondaryDisks }).(pulumi.StringMapOutput)
}
// Creation timestamp in RFC3339 text format.
func (o RegionDiskOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// An optional description of this resource. Provide this property when you create the resource.
func (o RegionDiskOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later.
func (o RegionDiskOutput) DiskEncryptionKey() CustomerEncryptionKeyResponseOutput {
return o.ApplyT(func(v *RegionDisk) CustomerEncryptionKeyResponseOutput { return v.DiskEncryptionKey }).(CustomerEncryptionKeyResponseOutput)
}
// Whether this disk is using confidential compute mode.
func (o RegionDiskOutput) EnableConfidentialCompute() pulumi.BoolOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.BoolOutput { return v.EnableConfidentialCompute }).(pulumi.BoolOutput)
}
// Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
func (o RegionDiskOutput) EraseWindowsVssSignature() pulumi.BoolOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.BoolOutput { return v.EraseWindowsVssSignature }).(pulumi.BoolOutput)
}
// A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
func (o RegionDiskOutput) GuestOsFeatures() GuestOsFeatureResponseArrayOutput {
return o.ApplyT(func(v *RegionDisk) GuestOsFeatureResponseArrayOutput { return v.GuestOsFeatures }).(GuestOsFeatureResponseArrayOutput)
}
// [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
//
// Deprecated: [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
func (o RegionDiskOutput) Interface() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Interface }).(pulumi.StringOutput)
}
// Type of the resource. Always compute#disk for disks.
func (o RegionDiskOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk.
func (o RegionDiskOutput) LabelFingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.LabelFingerprint }).(pulumi.StringOutput)
}
// Labels to apply to this disk. These can be later modified by the setLabels method.
func (o RegionDiskOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
// Last attach timestamp in RFC3339 text format.
func (o RegionDiskOutput) LastAttachTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.LastAttachTimestamp }).(pulumi.StringOutput)
}
// Last detach timestamp in RFC3339 text format.
func (o RegionDiskOutput) LastDetachTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.LastDetachTimestamp }).(pulumi.StringOutput)
}
// Integer license codes indicating which licenses are attached to this disk.
func (o RegionDiskOutput) LicenseCodes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringArrayOutput { return v.LicenseCodes }).(pulumi.StringArrayOutput)
}
// A list of publicly visible licenses. Reserved for Google's use.
func (o RegionDiskOutput) Licenses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringArrayOutput { return v.Licenses }).(pulumi.StringArrayOutput)
}
// An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
func (o RegionDiskOutput) LocationHint() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.LocationHint }).(pulumi.StringOutput)
}
// The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false
func (o RegionDiskOutput) Locked() pulumi.BoolOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.BoolOutput { return v.Locked }).(pulumi.BoolOutput)
}
// Indicates whether or not the disk can be read/write attached to more than one instance.
func (o RegionDiskOutput) MultiWriter() pulumi.BoolOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.BoolOutput { return v.MultiWriter }).(pulumi.BoolOutput)
}
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
func (o RegionDiskOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Internal use only.
func (o RegionDiskOutput) Options() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Options }).(pulumi.StringOutput)
}
// Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
func (o RegionDiskOutput) Params() DiskParamsResponseOutput {
return o.ApplyT(func(v *RegionDisk) DiskParamsResponseOutput { return v.Params }).(DiskParamsResponseOutput)
}
// Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
func (o RegionDiskOutput) PhysicalBlockSizeBytes() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.PhysicalBlockSizeBytes }).(pulumi.StringOutput)
}
func (o RegionDiskOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.
func (o RegionDiskOutput) ProvisionedIops() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.ProvisionedIops }).(pulumi.StringOutput)
}
// Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be between 1 and 7,124.
func (o RegionDiskOutput) ProvisionedThroughput() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.ProvisionedThroughput }).(pulumi.StringOutput)
}
func (o RegionDiskOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
func (o RegionDiskOutput) ReplicaZones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringArrayOutput { return v.ReplicaZones }).(pulumi.StringArrayOutput)
}
// 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. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
func (o RegionDiskOutput) RequestId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringPtrOutput { return v.RequestId }).(pulumi.StringPtrOutput)
}
// Resource policies applied to this disk for automatic snapshot creations.
func (o RegionDiskOutput) ResourcePolicies() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringArrayOutput { return v.ResourcePolicies }).(pulumi.StringArrayOutput)
}
// Status information for the disk resource.
func (o RegionDiskOutput) ResourceStatus() DiskResourceStatusResponseOutput {
return o.ApplyT(func(v *RegionDisk) DiskResourceStatusResponseOutput { return v.ResourceStatus }).(DiskResourceStatusResponseOutput)
}
// Reserved for future use.
func (o RegionDiskOutput) SatisfiesPzs() pulumi.BoolOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.BoolOutput { return v.SatisfiesPzs }).(pulumi.BoolOutput)
}
// Server-defined fully-qualified URL for this resource.
func (o RegionDiskOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// Server-defined URL for this resource's resource id.
func (o RegionDiskOutput) SelfLinkWithId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SelfLinkWithId }).(pulumi.StringOutput)
}
// Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.
func (o RegionDiskOutput) SizeGb() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SizeGb }).(pulumi.StringOutput)
}
// URL of the DiskConsistencyGroupPolicy for a secondary disk that was created using a consistency group.
func (o RegionDiskOutput) SourceConsistencyGroupPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceConsistencyGroupPolicy }).(pulumi.StringOutput)
}
// ID of the DiskConsistencyGroupPolicy for a secondary disk that was created using a consistency group.
func (o RegionDiskOutput) SourceConsistencyGroupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceConsistencyGroupPolicyId }).(pulumi.StringOutput)
}
// The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk
func (o RegionDiskOutput) SourceDisk() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceDisk }).(pulumi.StringOutput)
}
// The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used.
func (o RegionDiskOutput) SourceDiskId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceDiskId }).(pulumi.StringOutput)
}
// Source image to restore onto a disk. This field is optional.
func (o RegionDiskOutput) SourceImage() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceImage }).(pulumi.StringOutput)
}
// The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
func (o RegionDiskOutput) SourceImageEncryptionKey() CustomerEncryptionKeyResponseOutput {
return o.ApplyT(func(v *RegionDisk) CustomerEncryptionKeyResponseOutput { return v.SourceImageEncryptionKey }).(CustomerEncryptionKeyResponseOutput)
}
// The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
func (o RegionDiskOutput) SourceImageId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceImageId }).(pulumi.StringOutput)
}
// The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot
func (o RegionDiskOutput) SourceInstantSnapshot() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceInstantSnapshot }).(pulumi.StringOutput)
}
// The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
func (o RegionDiskOutput) SourceInstantSnapshotId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceInstantSnapshotId }).(pulumi.StringOutput)
}
// The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project /global/snapshots/snapshot - projects/project/global/snapshots/snapshot - global/snapshots/snapshot
func (o RegionDiskOutput) SourceSnapshot() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceSnapshot }).(pulumi.StringOutput)
}
// The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
func (o RegionDiskOutput) SourceSnapshotEncryptionKey() CustomerEncryptionKeyResponseOutput {
return o.ApplyT(func(v *RegionDisk) CustomerEncryptionKeyResponseOutput { return v.SourceSnapshotEncryptionKey }).(CustomerEncryptionKeyResponseOutput)
}
// The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
func (o RegionDiskOutput) SourceSnapshotId() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceSnapshotId }).(pulumi.StringOutput)
}
// The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
func (o RegionDiskOutput) SourceStorageObject() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.SourceStorageObject }).(pulumi.StringOutput)
}
// The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is ready for use. - DELETING: Disk is deleting.
func (o RegionDiskOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool
func (o RegionDiskOutput) StoragePool() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.StoragePool }).(pulumi.StringOutput)
}
// [Deprecated] Storage type of the persistent disk.
//
// Deprecated: [Deprecated] Storage type of the persistent disk.
func (o RegionDiskOutput) StorageType() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.StorageType }).(pulumi.StringOutput)
}
// URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types.
func (o RegionDiskOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
func (o RegionDiskOutput) UserLicenses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringArrayOutput { return v.UserLicenses }).(pulumi.StringArrayOutput)
}
// Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
func (o RegionDiskOutput) Users() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringArrayOutput { return v.Users }).(pulumi.StringArrayOutput)
}
// URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
func (o RegionDiskOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v *RegionDisk) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RegionDiskInput)(nil)).Elem(), &RegionDisk{})
pulumi.RegisterOutputType(RegionDiskOutput{})
}