gce_make_disk function

Creates a persistent disk in the specified project using the data in the request.

Creates a persistent disk in the specified project using the data in the request.

You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties.

gce_make_disk(name, sourceImage = NULL, sizeGb = NULL, description = NULL, diskEncryptionKey = NULL, licenses = NULL, sourceSnapshot = NULL, sourceImageEncryptionKey = NULL, sourceSnapshotEncryptionKey = NULL, type = NULL, project = gce_get_global_project(), zone = gce_get_global_zone())

Arguments

  • name: Name of the resource
  • sourceImage: The source image used to create this disk
  • sizeGb: Size of the persistent disk, specified in GB
  • description: An optional description of this resource
  • diskEncryptionKey: Encrypts the disk using a customer-supplied encryption key
  • licenses: Any applicable publicly visible licenses
  • sourceSnapshot: The source snapshot used to create this disk
  • sourceImageEncryptionKey: The customer-supplied encryption key of the source image
  • sourceSnapshotEncryptionKey: The customer-supplied encryption key of the source snapshot
  • type: URL of the disk type resource describing which disk type to use to create the disk
  • project: Project ID for this request
  • zone: The name of the zone for this request

Returns

a zone operation

Details

You can also create a disk that is larger than the default size by specifying the sizeGb property.

Authentication scopes used by this function are:

See Also

Google Documentation