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

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.compute.getDiskEncryptionSet

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Use this data source to access information about an existing Disk Encryption Set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const existing = azure.compute.getDiskEncryptionSet({
        name: "example-des",
        resourceGroupName: "example-resources",
    });
    export const id = existing.then(existing => existing.id);
    
    import pulumi
    import pulumi_azure as azure
    
    existing = azure.compute.get_disk_encryption_set(name="example-des",
        resource_group_name="example-resources")
    pulumi.export("id", existing.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		existing, err := compute.LookupDiskEncryptionSet(ctx, &compute.LookupDiskEncryptionSetArgs{
    			Name:              "example-des",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", existing.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var existing = Azure.Compute.GetDiskEncryptionSet.Invoke(new()
        {
            Name = "example-des",
            ResourceGroupName = "example-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = existing.Apply(getDiskEncryptionSetResult => getDiskEncryptionSetResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.compute.ComputeFunctions;
    import com.pulumi.azure.compute.inputs.GetDiskEncryptionSetArgs;
    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) {
            final var existing = ComputeFunctions.getDiskEncryptionSet(GetDiskEncryptionSetArgs.builder()
                .name("example-des")
                .resourceGroupName("example-resources")
                .build());
    
            ctx.export("id", existing.applyValue(getDiskEncryptionSetResult -> getDiskEncryptionSetResult.id()));
        }
    }
    
    variables:
      existing:
        fn::invoke:
          Function: azure:compute:getDiskEncryptionSet
          Arguments:
            name: example-des
            resourceGroupName: example-resources
    outputs:
      id: ${existing.id}
    

    Using getDiskEncryptionSet

    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 getDiskEncryptionSet(args: GetDiskEncryptionSetArgs, opts?: InvokeOptions): Promise<GetDiskEncryptionSetResult>
    function getDiskEncryptionSetOutput(args: GetDiskEncryptionSetOutputArgs, opts?: InvokeOptions): Output<GetDiskEncryptionSetResult>
    def get_disk_encryption_set(name: Optional[str] = None,
                                resource_group_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetDiskEncryptionSetResult
    def get_disk_encryption_set_output(name: Optional[pulumi.Input[str]] = None,
                                resource_group_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetDiskEncryptionSetResult]
    func LookupDiskEncryptionSet(ctx *Context, args *LookupDiskEncryptionSetArgs, opts ...InvokeOption) (*LookupDiskEncryptionSetResult, error)
    func LookupDiskEncryptionSetOutput(ctx *Context, args *LookupDiskEncryptionSetOutputArgs, opts ...InvokeOption) LookupDiskEncryptionSetResultOutput

    > Note: This function is named LookupDiskEncryptionSet in the Go SDK.

    public static class GetDiskEncryptionSet 
    {
        public static Task<GetDiskEncryptionSetResult> InvokeAsync(GetDiskEncryptionSetArgs args, InvokeOptions? opts = null)
        public static Output<GetDiskEncryptionSetResult> Invoke(GetDiskEncryptionSetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDiskEncryptionSetResult> getDiskEncryptionSet(GetDiskEncryptionSetArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:compute/getDiskEncryptionSet:getDiskEncryptionSet
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the existing Disk Encryption Set.
    ResourceGroupName string
    The name of the Resource Group where the Disk Encryption Set exists.
    Name string
    The name of the existing Disk Encryption Set.
    ResourceGroupName string
    The name of the Resource Group where the Disk Encryption Set exists.
    name String
    The name of the existing Disk Encryption Set.
    resourceGroupName String
    The name of the Resource Group where the Disk Encryption Set exists.
    name string
    The name of the existing Disk Encryption Set.
    resourceGroupName string
    The name of the Resource Group where the Disk Encryption Set exists.
    name str
    The name of the existing Disk Encryption Set.
    resource_group_name str
    The name of the Resource Group where the Disk Encryption Set exists.
    name String
    The name of the existing Disk Encryption Set.
    resourceGroupName String
    The name of the Resource Group where the Disk Encryption Set exists.

    getDiskEncryptionSet Result

    The following output properties are available:

    AutoKeyRotationEnabled bool
    Is the Azure Disk Encryption Set Key automatically rotated to latest version?
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetDiskEncryptionSetIdentity>
    An identity block as defined below.
    KeyVaultKeyUrl string
    The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service.
    Location string
    The location where the Disk Encryption Set exists.
    Name string
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Disk Encryption Set.
    AutoKeyRotationEnabled bool
    Is the Azure Disk Encryption Set Key automatically rotated to latest version?
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetDiskEncryptionSetIdentity
    An identity block as defined below.
    KeyVaultKeyUrl string
    The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service.
    Location string
    The location where the Disk Encryption Set exists.
    Name string
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags assigned to the Disk Encryption Set.
    autoKeyRotationEnabled Boolean
    Is the Azure Disk Encryption Set Key automatically rotated to latest version?
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetDiskEncryptionSetIdentity>
    An identity block as defined below.
    keyVaultKeyUrl String
    The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service.
    location String
    The location where the Disk Encryption Set exists.
    name String
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags assigned to the Disk Encryption Set.
    autoKeyRotationEnabled boolean
    Is the Azure Disk Encryption Set Key automatically rotated to latest version?
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetDiskEncryptionSetIdentity[]
    An identity block as defined below.
    keyVaultKeyUrl string
    The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service.
    location string
    The location where the Disk Encryption Set exists.
    name string
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags assigned to the Disk Encryption Set.
    auto_key_rotation_enabled bool
    Is the Azure Disk Encryption Set Key automatically rotated to latest version?
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetDiskEncryptionSetIdentity]
    An identity block as defined below.
    key_vault_key_url str
    The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service.
    location str
    The location where the Disk Encryption Set exists.
    name str
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags assigned to the Disk Encryption Set.
    autoKeyRotationEnabled Boolean
    Is the Azure Disk Encryption Set Key automatically rotated to latest version?
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    An identity block as defined below.
    keyVaultKeyUrl String
    The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service.
    location String
    The location where the Disk Encryption Set exists.
    name String
    resourceGroupName String
    tags Map<String>
    A mapping of tags assigned to the Disk Encryption Set.

    Supporting Types

    GetDiskEncryptionSetIdentity

    IdentityIds List<string>
    A list of User Assigned Managed Identity IDs assigned to this Disk Encryption Set.
    PrincipalId string
    The (Client) ID of the Service Principal.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    Type string
    The type of Managed Service Identity that is configured on this Disk Encryption Set.
    IdentityIds []string
    A list of User Assigned Managed Identity IDs assigned to this Disk Encryption Set.
    PrincipalId string
    The (Client) ID of the Service Principal.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    Type string
    The type of Managed Service Identity that is configured on this Disk Encryption Set.
    identityIds List<String>
    A list of User Assigned Managed Identity IDs assigned to this Disk Encryption Set.
    principalId String
    The (Client) ID of the Service Principal.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The type of Managed Service Identity that is configured on this Disk Encryption Set.
    identityIds string[]
    A list of User Assigned Managed Identity IDs assigned to this Disk Encryption Set.
    principalId string
    The (Client) ID of the Service Principal.
    tenantId string
    The ID of the Tenant the Service Principal is assigned in.
    type string
    The type of Managed Service Identity that is configured on this Disk Encryption Set.
    identity_ids Sequence[str]
    A list of User Assigned Managed Identity IDs assigned to this Disk Encryption Set.
    principal_id str
    The (Client) ID of the Service Principal.
    tenant_id str
    The ID of the Tenant the Service Principal is assigned in.
    type str
    The type of Managed Service Identity that is configured on this Disk Encryption Set.
    identityIds List<String>
    A list of User Assigned Managed Identity IDs assigned to this Disk Encryption Set.
    principalId String
    The (Client) ID of the Service Principal.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The type of Managed Service Identity that is configured on this Disk Encryption Set.

    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 v6.2.0 published on Friday, Sep 27, 2024 by Pulumi