We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about an existing Managed Disk.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var existing = Output.Create(Azure.Compute.GetManagedDisk.InvokeAsync(new Azure.Compute.GetManagedDiskArgs
{
Name = "example-datadisk",
ResourceGroupName = "example-resources",
}));
this.Id = existing.Apply(existing => existing.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
existing, err := compute.LookupManagedDisk(ctx, &compute.LookupManagedDiskArgs{
Name: "example-datadisk",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("id", existing.Id)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const existing = azure.compute.getManagedDisk({
name: "example-datadisk",
resourceGroupName: "example-resources",
});
export const id = existing.then(existing => existing.id);
import pulumi
import pulumi_azure as azure
existing = azure.compute.get_managed_disk(name="example-datadisk",
resource_group_name="example-resources")
pulumi.export("id", existing.id)
Example coming soon!
Using getManagedDisk
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getManagedDisk(args: GetManagedDiskArgs, opts?: InvokeOptions): Promise<GetManagedDiskResult>
function getManagedDiskOutput(args: GetManagedDiskOutputArgs, opts?: InvokeOptions): Output<GetManagedDiskResult>def get_managed_disk(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedDiskResult
def get_managed_disk_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedDiskResult]func LookupManagedDisk(ctx *Context, args *LookupManagedDiskArgs, opts ...InvokeOption) (*LookupManagedDiskResult, error)
func LookupManagedDiskOutput(ctx *Context, args *LookupManagedDiskOutputArgs, opts ...InvokeOption) LookupManagedDiskResultOutput> Note: This function is named LookupManagedDisk in the Go SDK.
public static class GetManagedDisk
{
public static Task<GetManagedDiskResult> InvokeAsync(GetManagedDiskArgs args, InvokeOptions? opts = null)
public static Output<GetManagedDiskResult> Invoke(GetManagedDiskInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedDiskResult> getManagedDisk(GetManagedDiskArgs args, InvokeOptions options)
public static Output<GetManagedDiskResult> getManagedDisk(GetManagedDiskArgs args, InvokeOptions options)
fn::invoke:
function: azure:compute/getManagedDisk:getManagedDisk
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the Managed Disk.
- Resource
Group stringName - Specifies the name of the Resource Group where this Managed Disk exists.
- Name string
- Specifies the name of the Managed Disk.
- Resource
Group stringName - Specifies the name of the Resource Group where this Managed Disk exists.
- name String
- Specifies the name of the Managed Disk.
- resource
Group StringName - Specifies the name of the Resource Group where this Managed Disk exists.
- name string
- Specifies the name of the Managed Disk.
- resource
Group stringName - Specifies the name of the Resource Group where this Managed Disk exists.
- name str
- Specifies the name of the Managed Disk.
- resource_
group_ strname - Specifies the name of the Resource Group where this Managed Disk exists.
- name String
- Specifies the name of the Managed Disk.
- resource
Group StringName - Specifies the name of the Resource Group where this Managed Disk exists.
getManagedDisk Result
The following output properties are available:
- Create
Option string - Disk
Encryption stringSet Id - The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- Disk
Iops intRead Write - The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- Disk
Mbps intRead Write - The bandwidth allowed for this disk.
- Disk
Size intGb - The size of the Managed Disk in gigabytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Reference stringId - The ID of the source image used for creating this Managed Disk.
- Name string
- Os
Type string - The operating system used for this Managed Disk.
- Resource
Group stringName - Source
Resource stringId - The ID of an existing Managed Disk which this Disk was created from.
- Source
Uri string - The Source URI for this Managed Disk.
- Storage
Account stringId - The ID of the Storage Account where the
source_uriis located. - Storage
Account stringType - The storage account type for the Managed Disk.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Zones List<string>
- A list of Availability Zones where the Managed Disk exists.
- Create
Option string - Disk
Encryption stringSet Id - The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- Disk
Iops intRead Write - The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- Disk
Mbps intRead Write - The bandwidth allowed for this disk.
- Disk
Size intGb - The size of the Managed Disk in gigabytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Reference stringId - The ID of the source image used for creating this Managed Disk.
- Name string
- Os
Type string - The operating system used for this Managed Disk.
- Resource
Group stringName - Source
Resource stringId - The ID of an existing Managed Disk which this Disk was created from.
- Source
Uri string - The Source URI for this Managed Disk.
- Storage
Account stringId - The ID of the Storage Account where the
source_uriis located. - Storage
Account stringType - The storage account type for the Managed Disk.
- map[string]string
- A mapping of tags assigned to the resource.
- Zones []string
- A list of Availability Zones where the Managed Disk exists.
- create
Option String - disk
Encryption StringSet Id - The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- disk
Iops IntegerRead Write - The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- disk
Mbps IntegerRead Write - The bandwidth allowed for this disk.
- disk
Size IntegerGb - The size of the Managed Disk in gigabytes.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Reference StringId - The ID of the source image used for creating this Managed Disk.
- name String
- os
Type String - The operating system used for this Managed Disk.
- resource
Group StringName - source
Resource StringId - The ID of an existing Managed Disk which this Disk was created from.
- source
Uri String - The Source URI for this Managed Disk.
- storage
Account StringId - The ID of the Storage Account where the
source_uriis located. - storage
Account StringType - The storage account type for the Managed Disk.
- Map<String,String>
- A mapping of tags assigned to the resource.
- zones List<String>
- A list of Availability Zones where the Managed Disk exists.
- create
Option string - disk
Encryption stringSet Id - The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- disk
Iops numberRead Write - The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- disk
Mbps numberRead Write - The bandwidth allowed for this disk.
- disk
Size numberGb - The size of the Managed Disk in gigabytes.
- id string
- The provider-assigned unique ID for this managed resource.
- image
Reference stringId - The ID of the source image used for creating this Managed Disk.
- name string
- os
Type string - The operating system used for this Managed Disk.
- resource
Group stringName - source
Resource stringId - The ID of an existing Managed Disk which this Disk was created from.
- source
Uri string - The Source URI for this Managed Disk.
- storage
Account stringId - The ID of the Storage Account where the
source_uriis located. - storage
Account stringType - The storage account type for the Managed Disk.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- zones string[]
- A list of Availability Zones where the Managed Disk exists.
- create_
option str - disk_
encryption_ strset_ id - The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- disk_
iops_ intread_ write - The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- disk_
mbps_ intread_ write - The bandwidth allowed for this disk.
- disk_
size_ intgb - The size of the Managed Disk in gigabytes.
- id str
- The provider-assigned unique ID for this managed resource.
- image_
reference_ strid - The ID of the source image used for creating this Managed Disk.
- name str
- os_
type str - The operating system used for this Managed Disk.
- resource_
group_ strname - source_
resource_ strid - The ID of an existing Managed Disk which this Disk was created from.
- source_
uri str - The Source URI for this Managed Disk.
- storage_
account_ strid - The ID of the Storage Account where the
source_uriis located. - storage_
account_ strtype - The storage account type for the Managed Disk.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- zones Sequence[str]
- A list of Availability Zones where the Managed Disk exists.
- create
Option String - disk
Encryption StringSet Id - The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- disk
Iops NumberRead Write - The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- disk
Mbps NumberRead Write - The bandwidth allowed for this disk.
- disk
Size NumberGb - The size of the Managed Disk in gigabytes.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Reference StringId - The ID of the source image used for creating this Managed Disk.
- name String
- os
Type String - The operating system used for this Managed Disk.
- resource
Group StringName - source
Resource StringId - The ID of an existing Managed Disk which this Disk was created from.
- source
Uri String - The Source URI for this Managed Disk.
- storage
Account StringId - The ID of the Storage Account where the
source_uriis located. - storage
Account StringType - The storage account type for the Managed Disk.
- Map<String>
- A mapping of tags assigned to the resource.
- zones List<String>
- A list of Availability Zones where the Managed Disk exists.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
