1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. DiskPool

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Disk Pool.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                AddressSpaces = 
                {
                    "10.0.0.0/16",
                },
            });
            var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
            {
                ResourceGroupName = exampleVirtualNetwork.ResourceGroupName,
                VirtualNetworkName = exampleVirtualNetwork.Name,
                AddressPrefixes = 
                {
                    "10.0.0.0/24",
                },
                Delegations = 
                {
                    new Azure.Network.Inputs.SubnetDelegationArgs
                    {
                        Name = "diskspool",
                        ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
                        {
                            Actions = 
                            {
                                "Microsoft.Network/virtualNetworks/read",
                            },
                            Name = "Microsoft.StoragePool/diskPools",
                        },
                    },
                },
            });
            var exampleDiskPool = new Azure.Compute.DiskPool("exampleDiskPool", new Azure.Compute.DiskPoolArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                SkuName = "Basic_B1",
                SubnetId = exampleSubnet.Id,
                Zones = 
                {
                    "1",
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
    			ResourceGroupName:  exampleVirtualNetwork.ResourceGroupName,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.0.0/24"),
    			},
    			Delegations: network.SubnetDelegationArray{
    				&network.SubnetDelegationArgs{
    					Name: pulumi.String("diskspool"),
    					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
    						Actions: pulumi.StringArray{
    							pulumi.String("Microsoft.Network/virtualNetworks/read"),
    						},
    						Name: pulumi.String("Microsoft.StoragePool/diskPools"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewDiskPool(ctx, "exampleDiskPool", &compute.DiskPoolArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			SkuName:           pulumi.String("Basic_B1"),
    			SubnetId:          exampleSubnet.ID(),
    			Zones: pulumi.StringArray{
    				pulumi.String("1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        addressSpaces: ["10.0.0.0/16"],
    });
    const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
        resourceGroupName: exampleVirtualNetwork.resourceGroupName,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.0.0/24"],
        delegations: [{
            name: "diskspool",
            serviceDelegation: {
                actions: ["Microsoft.Network/virtualNetworks/read"],
                name: "Microsoft.StoragePool/diskPools",
            },
        }],
    });
    const exampleDiskPool = new azure.compute.DiskPool("exampleDiskPool", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        skuName: "Basic_B1",
        subnetId: exampleSubnet.id,
        zones: ["1"],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        address_spaces=["10.0.0.0/16"])
    example_subnet = azure.network.Subnet("exampleSubnet",
        resource_group_name=example_virtual_network.resource_group_name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.0.0/24"],
        delegations=[azure.network.SubnetDelegationArgs(
            name="diskspool",
            service_delegation=azure.network.SubnetDelegationServiceDelegationArgs(
                actions=["Microsoft.Network/virtualNetworks/read"],
                name="Microsoft.StoragePool/diskPools",
            ),
        )])
    example_disk_pool = azure.compute.DiskPool("exampleDiskPool",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        sku_name="Basic_B1",
        subnet_id=example_subnet.id,
        zones=["1"])
    

    Example coming soon!

    Create DiskPool Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DiskPool(name: string, args: DiskPoolArgs, opts?: CustomResourceOptions);
    @overload
    def DiskPool(resource_name: str,
                 args: DiskPoolArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def DiskPool(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 resource_group_name: Optional[str] = None,
                 sku_name: Optional[str] = None,
                 subnet_id: Optional[str] = None,
                 zones: Optional[Sequence[str]] = None,
                 location: Optional[str] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewDiskPool(ctx *Context, name string, args DiskPoolArgs, opts ...ResourceOption) (*DiskPool, error)
    public DiskPool(string name, DiskPoolArgs args, CustomResourceOptions? opts = null)
    public DiskPool(String name, DiskPoolArgs args)
    public DiskPool(String name, DiskPoolArgs args, CustomResourceOptions options)
    
    type: azure:compute:DiskPool
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DiskPoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DiskPoolArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DiskPoolArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DiskPoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DiskPoolArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var diskPoolResource = new Azure.Compute.DiskPool("diskPoolResource", new()
    {
        ResourceGroupName = "string",
        SkuName = "string",
        SubnetId = "string",
        Zones = new[]
        {
            "string",
        },
        Location = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := compute.NewDiskPool(ctx, "diskPoolResource", &compute.DiskPoolArgs{
    	ResourceGroupName: pulumi.String("string"),
    	SkuName:           pulumi.String("string"),
    	SubnetId:          pulumi.String("string"),
    	Zones: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Location: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var diskPoolResource = new DiskPool("diskPoolResource", DiskPoolArgs.builder()
        .resourceGroupName("string")
        .skuName("string")
        .subnetId("string")
        .zones("string")
        .location("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    disk_pool_resource = azure.compute.DiskPool("diskPoolResource",
        resource_group_name="string",
        sku_name="string",
        subnet_id="string",
        zones=["string"],
        location="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const diskPoolResource = new azure.compute.DiskPool("diskPoolResource", {
        resourceGroupName: "string",
        skuName: "string",
        subnetId: "string",
        zones: ["string"],
        location: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:compute:DiskPool
    properties:
        location: string
        name: string
        resourceGroupName: string
        skuName: string
        subnetId: string
        tags:
            string: string
        zones:
            - string
    

    DiskPool Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DiskPool resource accepts the following input properties:

    ResourceGroupName string
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    SkuName string
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    SubnetId string
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    Zones List<string>
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    Location string
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    Name string
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Disk Pool.
    ResourceGroupName string
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    SkuName string
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    SubnetId string
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    Zones []string
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    Location string
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    Name string
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Disk Pool.
    resourceGroupName String
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    skuName String
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnetId String
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    zones List<String>
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location String
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name String
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Disk Pool.
    resourceGroupName string
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    skuName string
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnetId string
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    zones string[]
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location string
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name string
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Disk Pool.
    resource_group_name str
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    sku_name str
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnet_id str
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    zones Sequence[str]
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location str
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name str
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Disk Pool.
    resourceGroupName String
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    skuName String
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnetId String
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    zones List<String>
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location String
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name String
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Disk Pool.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DiskPool resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DiskPool Resource

    Get an existing DiskPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DiskPoolState, opts?: CustomResourceOptions): DiskPool
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            sku_name: Optional[str] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            zones: Optional[Sequence[str]] = None) -> DiskPool
    func GetDiskPool(ctx *Context, name string, id IDInput, state *DiskPoolState, opts ...ResourceOption) (*DiskPool, error)
    public static DiskPool Get(string name, Input<string> id, DiskPoolState? state, CustomResourceOptions? opts = null)
    public static DiskPool get(String name, Output<String> id, DiskPoolState state, CustomResourceOptions options)
    resources:  _:    type: azure:compute:DiskPool    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Location string
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    Name string
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    ResourceGroupName string
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    SkuName string
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    SubnetId string
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Disk Pool.
    Zones List<string>
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    Location string
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    Name string
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    ResourceGroupName string
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    SkuName string
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    SubnetId string
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Disk Pool.
    Zones []string
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location String
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name String
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    resourceGroupName String
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    skuName String
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnetId String
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Disk Pool.
    zones List<String>
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location string
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name string
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    resourceGroupName string
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    skuName string
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnetId string
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Disk Pool.
    zones string[]
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location str
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name str
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    resource_group_name str
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    sku_name str
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnet_id str
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Disk Pool.
    zones Sequence[str]
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.
    location String
    The Azure Region where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    name String
    The name of the Disk Pool. Changing this forces a new Disk Pool to be created.
    resourceGroupName String
    The name of the Resource Group where the Disk Pool should exist. Changing this forces a new Disk Pool to be created.
    skuName String
    The Sku of the Disk Pool. Possible values are Basic_B1, Standard_S1 and Premium_P1. Changing this forces a new Disk Pool to be created.
    subnetId String
    The ID of the Subnet where the Disk Pool should be created. Changing this forces a new Disk Pool to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Disk Pool.
    zones List<String>
    A list of Zones where this Disk Pool should be deployed. Changing this forces a new Disk Pool to be created.

    Import

    Disk Pools can be imported using the resource id, e.g.

     $ pulumi import azure:compute/diskPool:DiskPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/diskPool1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.