azure logo
Azure Classic v5.38.0, Mar 21 23

azure.compute.getDiskEncryptionSet

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

Example Usage

using System.Collections.Generic;
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 main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/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
	})
}
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()));
    }
}
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)
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);
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 Disk Encryption Set exists.

ResourceGroupName string

The name of the Resource Group where the Disk Encryption Set exists.

Name string

The name of the Disk Encryption Set exists.

ResourceGroupName string

The name of the Resource Group where the Disk Encryption Set exists.

name String

The name of the Disk Encryption Set exists.

resourceGroupName String

The name of the Resource Group where the Disk Encryption Set exists.

name string

The name of the Disk Encryption Set exists.

resourceGroupName string

The name of the Resource Group where the Disk Encryption Set exists.

name str

The name of the Disk Encryption Set exists.

resource_group_name str

The name of the Resource Group where the Disk Encryption Set exists.

name String

The name of the Disk Encryption Set exists.

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.

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.

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.

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.

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.

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.

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.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.