Skip to main content

Disk

Manages a Peristent Disk

Create a disk and attach it to a virtual machine:

const disk = provider.compute.makeDisk({
name: `my-disk`,
properties: () => ({
sizeGb: "50",
}),
});
const server = provider.compute.makeVmInstance({
name: `webserver`,
dependencies: {
disks: [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#