fast-solstice-31083
04/03/2023, 5:56 AMconst myManagedDisk = new azure.compute.ManagedDisk("myManagedDisk", {
location: resourceGroup.location,
resourceGroupName: resourceGroup.name,
storageAccountType: "Standard_LRS",
createOption: "Empty",
diskSizeGb: 250,
});
const gpuDataDiskAttachment = new azure.compute.DataDiskAttachment("myDataDiskAttachment", {
managedDiskId: myManagedDisk.id,
virtualMachineId: vm.id,
lun: 10,
caching: "ReadOnly",
});
That worked well. The disk still exist in the RessourceGroup, but on rerun i want to use the existing managed disk, but i m not able to attach it to a new a vm if i rerun the stack, no matter what i change.
if i dont change my script creationOption would be "Empty" like shown above, then i get : Code="ConflictingUserInput" Message="source-osdisk already exists in resource group RG-5265FCB5. Only CreateOption.Attach is supported."
Ok, but when i change to attach i get: resource 'source' has a problem: expected create_option to be one of [Copy Empty FromImage Import ImportSecure Restore Upload], got Attach. Examine values at 'ManagedDisk.CreateOption'.
In doc: https://www.pulumi.com/registry/packages/azure/api-docs/compute/manageddisk/ there "Possible values include:" are empty
But how would i attach an existing manged disk to the vm.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by