Skip to main content

Disk

Manages a Peristent Disk

Create a disk and attach it to a virtual machine:

provider.compute.makeDisk({
name: `my-disk`,
properties: () => ({
sizeGb: "50",
}),
});

provider.compute.makeVmInstance({
name: `webserver`,
dependencies: {
disks: ["my-disk"),
},
properties: () => ({
diskSizeGb: "20",
machineType: "f1-micro",
sourceImage:
"projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts",
metadata: {
items: [
{
key: "enable-oslogin",
value: "True",
},
],
},
}),
});

Examples

Properties

Used By