Managed Disk Args
data class ManagedDiskArgs(val createOption: Output<String>? = null, val diskAccessId: Output<String>? = null, val diskEncryptionSetId: Output<String>? = null, val diskIopsReadOnly: Output<Int>? = null, val diskIopsReadWrite: Output<Int>? = null, val diskMbpsReadOnly: Output<Int>? = null, val diskMbpsReadWrite: Output<Int>? = null, val diskSizeGb: Output<Int>? = null, val edgeZone: Output<String>? = null, val encryptionSettings: Output<ManagedDiskEncryptionSettingsArgs>? = null, val galleryImageReferenceId: Output<String>? = null, val hyperVGeneration: Output<String>? = null, val imageReferenceId: Output<String>? = null, val location: Output<String>? = null, val logicalSectorSize: Output<Int>? = null, val maxShares: Output<Int>? = null, val name: Output<String>? = null, val networkAccessPolicy: Output<String>? = null, val onDemandBurstingEnabled: Output<Boolean>? = null, val optimizedFrequentAttachEnabled: Output<Boolean>? = null, val osType: Output<String>? = null, val performancePlusEnabled: Output<Boolean>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val secureVmDiskEncryptionSetId: Output<String>? = null, val securityType: Output<String>? = null, val sourceResourceId: Output<String>? = null, val sourceUri: Output<String>? = null, val storageAccountId: Output<String>? = null, val storageAccountType: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val tier: Output<String>? = null, val trustedLaunchEnabled: Output<Boolean>? = null, val uploadSizeBytes: Output<Int>? = null, val zone: Output<String>? = null) : ConvertibleToJava<ManagedDiskArgs>
Manages a managed disk.
Example Usage
With Create Empty
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.compute.ManagedDisk;
import com.pulumi.azure.compute.ManagedDiskArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleManagedDisk = new ManagedDisk("exampleManagedDisk", ManagedDiskArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.storageAccountType("Standard_LRS")
.createOption("Empty")
.diskSizeGb("1")
.tags(Map.of("environment", "staging"))
.build());
}
}
Content copied to clipboard
With Create Copy
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.compute.ManagedDisk;
import com.pulumi.azure.compute.ManagedDiskArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var source = new ManagedDisk("source", ManagedDiskArgs.builder()
.location(example.location())
.resourceGroupName(example.name())
.storageAccountType("Standard_LRS")
.createOption("Empty")
.diskSizeGb("1")
.tags(Map.of("environment", "staging"))
.build());
var copy = new ManagedDisk("copy", ManagedDiskArgs.builder()
.location(example.location())
.resourceGroupName(example.name())
.storageAccountType("Standard_LRS")
.createOption("Copy")
.sourceResourceId(source.id())
.diskSizeGb("1")
.tags(Map.of("environment", "staging"))
.build());
}
}
Content copied to clipboard
Import
Managed Disks can be imported using the resource id
, e.g.
$ pulumi import azure:compute/managedDisk:ManagedDisk example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/disks/manageddisk1
Content copied to clipboard
Constructors
Link copied to clipboard
fun ManagedDiskArgs(createOption: Output<String>? = null, diskAccessId: Output<String>? = null, diskEncryptionSetId: Output<String>? = null, diskIopsReadOnly: Output<Int>? = null, diskIopsReadWrite: Output<Int>? = null, diskMbpsReadOnly: Output<Int>? = null, diskMbpsReadWrite: Output<Int>? = null, diskSizeGb: Output<Int>? = null, edgeZone: Output<String>? = null, encryptionSettings: Output<ManagedDiskEncryptionSettingsArgs>? = null, galleryImageReferenceId: Output<String>? = null, hyperVGeneration: Output<String>? = null, imageReferenceId: Output<String>? = null, location: Output<String>? = null, logicalSectorSize: Output<Int>? = null, maxShares: Output<Int>? = null, name: Output<String>? = null, networkAccessPolicy: Output<String>? = null, onDemandBurstingEnabled: Output<Boolean>? = null, optimizedFrequentAttachEnabled: Output<Boolean>? = null, osType: Output<String>? = null, performancePlusEnabled: Output<Boolean>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, secureVmDiskEncryptionSetId: Output<String>? = null, securityType: Output<String>? = null, sourceResourceId: Output<String>? = null, sourceUri: Output<String>? = null, storageAccountId: Output<String>? = null, storageAccountType: Output<String>? = null, tags: Output<Map<String, String>>? = null, tier: Output<String>? = null, trustedLaunchEnabled: Output<Boolean>? = null, uploadSizeBytes: Output<Int>? = null, zone: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Whether it is allowed to access the disk via public network. Defaults to true
. For more information on managed disks, such as sizing options and pricing, please check out the Azure Documentation.
Link copied to clipboard
Specifies the size of the managed disk to create in bytes. Required when create_option
is Upload
. The value must be equal to the source disk to be copied in bytes. Source disk size could be calculated with ls -l
or wc -c
. More information can be found at Copy a managed disk. Changing this forces a new resource to be created.