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

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.compute.DiskPoolManagedDiskAttachment

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    Manages a Disk Pool Managed Disk Attachment.

    !> Note: Azure are officially halting the preview of Azure Disk Pools, and it will not be made generally available. New customers will not be able to register the Microsoft.StoragePool resource provider on their subscription and deploy new Disk Pools. Existing subscriptions registered with Microsoft.StoragePool may continue to deploy and manage disk pools for the time being.

    Note: Must be either a premium SSD, standard SSD, or an ultra disk in the same region and availability zone as the disk pool.

    Note: Ultra disks must have a disk sector size of 512 bytes.

    Note: Must be a shared disk, with a maxShares value of two or greater.

    Note: You must provide the StoragePool resource provider RBAC permissions to the disks that will be added to the disk pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as azuread from "@pulumi/azuread";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("example", {
        name: "example",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "example-network",
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        addressSpaces: ["10.0.0.0/16"],
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "example-subnet",
        resourceGroupName: exampleResourceGroup.name,
        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("example", {
        name: "example-pool",
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        subnetId: exampleSubnet.id,
        zones: ["1"],
        skuName: "Basic_B1",
    });
    const exampleManagedDisk = new azure.compute.ManagedDisk("example", {
        name: "example-disk",
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        createOption: "Empty",
        storageAccountType: "Premium_LRS",
        diskSizeGb: 4,
        maxShares: 2,
        zone: "1",
    });
    const example = azuread.getServicePrincipal({
        displayName: "StoragePool Resource Provider",
    });
    const roles = [
        "Disk Pool Operator",
        "Virtual Machine Contributor",
    ];
    const exampleAssignment: azure.authorization.Assignment[] = [];
    for (const range = {value: 0}; range.value < roles.length; range.value++) {
        exampleAssignment.push(new azure.authorization.Assignment(`example-${range.value}`, {
            principalId: example.then(example => example.id),
            roleDefinitionName: roles[range.value],
            scope: exampleManagedDisk.id,
        }));
    }
    const exampleDiskPoolManagedDiskAttachment = new azure.compute.DiskPoolManagedDiskAttachment("example", {
        diskPoolId: exampleDiskPool.id,
        managedDiskId: exampleManagedDisk.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_azuread as azuread
    
    example_resource_group = azure.core.ResourceGroup("example",
        name="example",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="example-network",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        address_spaces=["10.0.0.0/16"])
    example_subnet = azure.network.Subnet("example",
        name="example-subnet",
        resource_group_name=example_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("example",
        name="example-pool",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        subnet_id=example_subnet.id,
        zones=["1"],
        sku_name="Basic_B1")
    example_managed_disk = azure.compute.ManagedDisk("example",
        name="example-disk",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        create_option="Empty",
        storage_account_type="Premium_LRS",
        disk_size_gb=4,
        max_shares=2,
        zone="1")
    example = azuread.get_service_principal(display_name="StoragePool Resource Provider")
    roles = [
        "Disk Pool Operator",
        "Virtual Machine Contributor",
    ]
    example_assignment = []
    for range in [{"value": i} for i in range(0, len(roles))]:
        example_assignment.append(azure.authorization.Assignment(f"example-{range['value']}",
            principal_id=example.id,
            role_definition_name=roles[range["value"]],
            scope=example_managed_disk.id))
    example_disk_pool_managed_disk_attachment = azure.compute.DiskPoolManagedDiskAttachment("example",
        disk_pool_id=example_disk_pool.id,
        managed_disk_id=example_managed_disk.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name:              pulumi.String("example-network"),
    			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, "example", &network.SubnetArgs{
    			Name:               pulumi.String("example-subnet"),
    			ResourceGroupName:  exampleResourceGroup.Name,
    			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
    		}
    		exampleDiskPool, err := compute.NewDiskPool(ctx, "example", &compute.DiskPoolArgs{
    			Name:              pulumi.String("example-pool"),
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			SubnetId:          exampleSubnet.ID(),
    			Zones: pulumi.StringArray{
    				pulumi.String("1"),
    			},
    			SkuName: pulumi.String("Basic_B1"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleManagedDisk, err := compute.NewManagedDisk(ctx, "example", &compute.ManagedDiskArgs{
    			Name:               pulumi.String("example-disk"),
    			ResourceGroupName:  exampleResourceGroup.Name,
    			Location:           exampleResourceGroup.Location,
    			CreateOption:       pulumi.String("Empty"),
    			StorageAccountType: pulumi.String("Premium_LRS"),
    			DiskSizeGb:         pulumi.Int(4),
    			MaxShares:          pulumi.Int(2),
    			Zone:               pulumi.String("1"),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
    			DisplayName: pulumi.StringRef("StoragePool Resource Provider"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		roles := []string{
    			"Disk Pool Operator",
    			"Virtual Machine Contributor",
    		}
    		var exampleAssignment []*authorization.Assignment
    		for index := 0; index < len(roles); index++ {
    			key0 := index
    			val0 := index
    			__res, err := authorization.NewAssignment(ctx, fmt.Sprintf("example-%v", key0), &authorization.AssignmentArgs{
    				PrincipalId:        pulumi.String(example.Id),
    				RoleDefinitionName: roles[val0],
    				Scope:              exampleManagedDisk.ID(),
    			})
    			if err != nil {
    				return err
    			}
    			exampleAssignment = append(exampleAssignment, __res)
    		}
    		_, err = compute.NewDiskPoolManagedDiskAttachment(ctx, "example", &compute.DiskPoolManagedDiskAttachmentArgs{
    			DiskPoolId:    exampleDiskPool.ID(),
    			ManagedDiskId: exampleManagedDisk.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "example-network",
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "example-subnet",
            ResourceGroupName = exampleResourceGroup.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.0.0/24",
            },
            Delegations = new[]
            {
                new Azure.Network.Inputs.SubnetDelegationArgs
                {
                    Name = "diskspool",
                    ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
                    {
                        Actions = new[]
                        {
                            "Microsoft.Network/virtualNetworks/read",
                        },
                        Name = "Microsoft.StoragePool/diskPools",
                    },
                },
            },
        });
    
        var exampleDiskPool = new Azure.Compute.DiskPool("example", new()
        {
            Name = "example-pool",
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            SubnetId = exampleSubnet.Id,
            Zones = new[]
            {
                "1",
            },
            SkuName = "Basic_B1",
        });
    
        var exampleManagedDisk = new Azure.Compute.ManagedDisk("example", new()
        {
            Name = "example-disk",
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            CreateOption = "Empty",
            StorageAccountType = "Premium_LRS",
            DiskSizeGb = 4,
            MaxShares = 2,
            Zone = "1",
        });
    
        var example = AzureAD.GetServicePrincipal.Invoke(new()
        {
            DisplayName = "StoragePool Resource Provider",
        });
    
        var roles = new[]
        {
            "Disk Pool Operator",
            "Virtual Machine Contributor",
        };
    
        var exampleAssignment = new List<Azure.Authorization.Assignment>();
        for (var rangeIndex = 0; rangeIndex < roles.Length; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            exampleAssignment.Add(new Azure.Authorization.Assignment($"example-{range.Value}", new()
            {
                PrincipalId = example.Apply(getServicePrincipalResult => getServicePrincipalResult.Id),
                RoleDefinitionName = roles[range.Value],
                Scope = exampleManagedDisk.Id,
            }));
        }
        var exampleDiskPoolManagedDiskAttachment = new Azure.Compute.DiskPoolManagedDiskAttachment("example", new()
        {
            DiskPoolId = exampleDiskPool.Id,
            ManagedDiskId = exampleManagedDisk.Id,
        });
    
    });
    
    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.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
    import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
    import com.pulumi.azure.compute.DiskPool;
    import com.pulumi.azure.compute.DiskPoolArgs;
    import com.pulumi.azure.compute.ManagedDisk;
    import com.pulumi.azure.compute.ManagedDiskArgs;
    import com.pulumi.azuread.AzureadFunctions;
    import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
    import com.pulumi.azure.authorization.Assignment;
    import com.pulumi.azure.authorization.AssignmentArgs;
    import com.pulumi.azure.compute.DiskPoolManagedDiskAttachment;
    import com.pulumi.azure.compute.DiskPoolManagedDiskAttachmentArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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()        
                .name("example")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .name("example-network")
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .addressSpaces("10.0.0.0/16")
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .name("example-subnet")
                .resourceGroupName(exampleResourceGroup.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.0.0/24")
                .delegations(SubnetDelegationArgs.builder()
                    .name("diskspool")
                    .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
                        .actions("Microsoft.Network/virtualNetworks/read")
                        .name("Microsoft.StoragePool/diskPools")
                        .build())
                    .build())
                .build());
    
            var exampleDiskPool = new DiskPool("exampleDiskPool", DiskPoolArgs.builder()        
                .name("example-pool")
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .subnetId(exampleSubnet.id())
                .zones("1")
                .skuName("Basic_B1")
                .build());
    
            var exampleManagedDisk = new ManagedDisk("exampleManagedDisk", ManagedDiskArgs.builder()        
                .name("example-disk")
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .createOption("Empty")
                .storageAccountType("Premium_LRS")
                .diskSizeGb(4)
                .maxShares(2)
                .zone("1")
                .build());
    
            final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
                .displayName("StoragePool Resource Provider")
                .build());
    
            final var roles =         
                "Disk Pool Operator",
                "Virtual Machine Contributor";
    
            for (var i = 0; i < roles.length(); i++) {
                new Assignment("exampleAssignment-" + i, AssignmentArgs.builder()            
                    .principalId(example.applyValue(getServicePrincipalResult -> getServicePrincipalResult.id()))
                    .roleDefinitionName(roles[range.value()])
                    .scope(exampleManagedDisk.id())
                    .build());
    
            
    }
            var exampleDiskPoolManagedDiskAttachment = new DiskPoolManagedDiskAttachment("exampleDiskPoolManagedDiskAttachment", DiskPoolManagedDiskAttachmentArgs.builder()        
                .diskPoolId(exampleDiskPool.id())
                .managedDiskId(exampleManagedDisk.id())
                .build());
    
        }
    }
    
    Coming soon!
    

    Create DiskPoolManagedDiskAttachment Resource

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

    Constructor syntax

    new DiskPoolManagedDiskAttachment(name: string, args: DiskPoolManagedDiskAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def DiskPoolManagedDiskAttachment(resource_name: str,
                                      args: DiskPoolManagedDiskAttachmentArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DiskPoolManagedDiskAttachment(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      disk_pool_id: Optional[str] = None,
                                      managed_disk_id: Optional[str] = None)
    func NewDiskPoolManagedDiskAttachment(ctx *Context, name string, args DiskPoolManagedDiskAttachmentArgs, opts ...ResourceOption) (*DiskPoolManagedDiskAttachment, error)
    public DiskPoolManagedDiskAttachment(string name, DiskPoolManagedDiskAttachmentArgs args, CustomResourceOptions? opts = null)
    public DiskPoolManagedDiskAttachment(String name, DiskPoolManagedDiskAttachmentArgs args)
    public DiskPoolManagedDiskAttachment(String name, DiskPoolManagedDiskAttachmentArgs args, CustomResourceOptions options)
    
    type: azure:compute:DiskPoolManagedDiskAttachment
    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 DiskPoolManagedDiskAttachmentArgs
    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 DiskPoolManagedDiskAttachmentArgs
    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 DiskPoolManagedDiskAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DiskPoolManagedDiskAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DiskPoolManagedDiskAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var diskPoolManagedDiskAttachmentResource = new Azure.Compute.DiskPoolManagedDiskAttachment("diskPoolManagedDiskAttachmentResource", new()
    {
        DiskPoolId = "string",
        ManagedDiskId = "string",
    });
    
    example, err := compute.NewDiskPoolManagedDiskAttachment(ctx, "diskPoolManagedDiskAttachmentResource", &compute.DiskPoolManagedDiskAttachmentArgs{
    	DiskPoolId:    pulumi.String("string"),
    	ManagedDiskId: pulumi.String("string"),
    })
    
    var diskPoolManagedDiskAttachmentResource = new DiskPoolManagedDiskAttachment("diskPoolManagedDiskAttachmentResource", DiskPoolManagedDiskAttachmentArgs.builder()        
        .diskPoolId("string")
        .managedDiskId("string")
        .build());
    
    disk_pool_managed_disk_attachment_resource = azure.compute.DiskPoolManagedDiskAttachment("diskPoolManagedDiskAttachmentResource",
        disk_pool_id="string",
        managed_disk_id="string")
    
    const diskPoolManagedDiskAttachmentResource = new azure.compute.DiskPoolManagedDiskAttachment("diskPoolManagedDiskAttachmentResource", {
        diskPoolId: "string",
        managedDiskId: "string",
    });
    
    type: azure:compute:DiskPoolManagedDiskAttachment
    properties:
        diskPoolId: string
        managedDiskId: string
    

    DiskPoolManagedDiskAttachment Resource Properties

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

    Inputs

    The DiskPoolManagedDiskAttachment resource accepts the following input properties:

    DiskPoolId string
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    ManagedDiskId string
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    DiskPoolId string
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    ManagedDiskId string
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    diskPoolId String
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managedDiskId String
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    diskPoolId string
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managedDiskId string
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    disk_pool_id str
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managed_disk_id str
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    diskPoolId String
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managedDiskId String
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DiskPoolManagedDiskAttachment 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 DiskPoolManagedDiskAttachment Resource

    Get an existing DiskPoolManagedDiskAttachment 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?: DiskPoolManagedDiskAttachmentState, opts?: CustomResourceOptions): DiskPoolManagedDiskAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disk_pool_id: Optional[str] = None,
            managed_disk_id: Optional[str] = None) -> DiskPoolManagedDiskAttachment
    func GetDiskPoolManagedDiskAttachment(ctx *Context, name string, id IDInput, state *DiskPoolManagedDiskAttachmentState, opts ...ResourceOption) (*DiskPoolManagedDiskAttachment, error)
    public static DiskPoolManagedDiskAttachment Get(string name, Input<string> id, DiskPoolManagedDiskAttachmentState? state, CustomResourceOptions? opts = null)
    public static DiskPoolManagedDiskAttachment get(String name, Output<String> id, DiskPoolManagedDiskAttachmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    DiskPoolId string
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    ManagedDiskId string
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    DiskPoolId string
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    ManagedDiskId string
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    diskPoolId String
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managedDiskId String
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    diskPoolId string
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managedDiskId string
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    disk_pool_id str
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managed_disk_id str
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.
    diskPoolId String
    The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created.
    managedDiskId String
    The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created.

    Import

    Disks Pool Managed Disk Attachments can be imported using the resource id, e.g.

    $ pulumi import azure:compute/diskPoolManagedDiskAttachment:DiskPoolManagedDiskAttachment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StoragePool/diskPools/storagePool1/managedDisks|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/disks/disk1
    

    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.

    Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi