Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

getManagedHardwareSecurityModule

Use this data source to access information about an existing Key Vault Managed Hardware Security Module.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.KeyVault.GetManagedHardwareSecurityModule.InvokeAsync(new Azure.KeyVault.GetManagedHardwareSecurityModuleArgs
        {
            Name = "mykeyvaultHsm",
            ResourceGroupName = "some-resource-group",
        }));
        this.HsmUri = example.Apply(example => example.HsmUri);
    }

    [Output("hsmUri")]
    public Output<string> HsmUri { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := keyvault.LookupManagedHardwareSecurityModule(ctx, &keyvault.LookupManagedHardwareSecurityModuleArgs{
			Name:              "mykeyvaultHsm",
			ResourceGroupName: "some-resource-group",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("hsmUri", example.HsmUri)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.keyvault.KeyvaultFunctions;
import com.pulumi.azure.keyvault.inputs.GetManagedHardwareSecurityModuleArgs;
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 example = KeyvaultFunctions.getManagedHardwareSecurityModule(GetManagedHardwareSecurityModuleArgs.builder()
            .name("mykeyvaultHsm")
            .resourceGroupName("some-resource-group")
            .build());

        ctx.export("hsmUri", example.applyValue(getManagedHardwareSecurityModuleResult -> getManagedHardwareSecurityModuleResult.hsmUri()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.keyvault.get_managed_hardware_security_module(name="mykeyvaultHsm",
    resource_group_name="some-resource-group")
pulumi.export("hsmUri", example.hsm_uri)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.keyvault.getManagedHardwareSecurityModule({
    name: "mykeyvaultHsm",
    resourceGroupName: "some-resource-group",
});
export const hsmUri = example.then(example => example.hsmUri);
variables:
  example:
    Fn::Invoke:
      Function: azure:keyvault:getManagedHardwareSecurityModule
      Arguments:
        name: mykeyvaultHsm
        resourceGroupName: some-resource-group
outputs:
  hsmUri: ${example.hsmUri}

Using getManagedHardwareSecurityModule

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 getManagedHardwareSecurityModule(args: GetManagedHardwareSecurityModuleArgs, opts?: InvokeOptions): Promise<GetManagedHardwareSecurityModuleResult>
function getManagedHardwareSecurityModuleOutput(args: GetManagedHardwareSecurityModuleOutputArgs, opts?: InvokeOptions): Output<GetManagedHardwareSecurityModuleResult>
def get_managed_hardware_security_module(name: Optional[str] = None,
                                         resource_group_name: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetManagedHardwareSecurityModuleResult
def get_managed_hardware_security_module_output(name: Optional[pulumi.Input[str]] = None,
                                         resource_group_name: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetManagedHardwareSecurityModuleResult]
func LookupManagedHardwareSecurityModule(ctx *Context, args *LookupManagedHardwareSecurityModuleArgs, opts ...InvokeOption) (*LookupManagedHardwareSecurityModuleResult, error)
func LookupManagedHardwareSecurityModuleOutput(ctx *Context, args *LookupManagedHardwareSecurityModuleOutputArgs, opts ...InvokeOption) LookupManagedHardwareSecurityModuleResultOutput

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

public static class GetManagedHardwareSecurityModule 
{
    public static Task<GetManagedHardwareSecurityModuleResult> InvokeAsync(GetManagedHardwareSecurityModuleArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedHardwareSecurityModuleResult> Invoke(GetManagedHardwareSecurityModuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedHardwareSecurityModuleResult> getManagedHardwareSecurityModule(GetManagedHardwareSecurityModuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:keyvault/getManagedHardwareSecurityModule:getManagedHardwareSecurityModule
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the Key Vault Managed Hardware Security Module.

ResourceGroupName string

The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.

Name string

The name of the Key Vault Managed Hardware Security Module.

ResourceGroupName string

The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.

name String

The name of the Key Vault Managed Hardware Security Module.

resourceGroupName String

The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.

name string

The name of the Key Vault Managed Hardware Security Module.

resourceGroupName string

The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.

name str

The name of the Key Vault Managed Hardware Security Module.

resource_group_name str

The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.

name String

The name of the Key Vault Managed Hardware Security Module.

resourceGroupName String

The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.

getManagedHardwareSecurityModule Result

The following output properties are available:

AdminObjectIds List<string>

Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module.

HsmUri string

The URI of the Hardware Security Module for performing operations on keys and secrets.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region in which the Key Vault managed Hardware Security Module exists.

Name string
PurgeProtectionEnabled bool

Is purge protection enabled on this Key Vault Managed Hardware Security Module?

ResourceGroupName string
SkuName string

The Name of the SKU used for this Key Vault Managed Hardware Security Module.

SoftDeleteRetentionDays int

The number of days that items should be retained for soft-deleted.

Tags Dictionary<string, string>

A mapping of tags assigned to the Key Vault Managed Hardware Security Module.

TenantId string

The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module.

AdminObjectIds []string

Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module.

HsmUri string

The URI of the Hardware Security Module for performing operations on keys and secrets.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region in which the Key Vault managed Hardware Security Module exists.

Name string
PurgeProtectionEnabled bool

Is purge protection enabled on this Key Vault Managed Hardware Security Module?

ResourceGroupName string
SkuName string

The Name of the SKU used for this Key Vault Managed Hardware Security Module.

SoftDeleteRetentionDays int

The number of days that items should be retained for soft-deleted.

Tags map[string]string

A mapping of tags assigned to the Key Vault Managed Hardware Security Module.

TenantId string

The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module.

adminObjectIds List<String>

Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module.

hsmUri String

The URI of the Hardware Security Module for performing operations on keys and secrets.

id String

The provider-assigned unique ID for this managed resource.

location String

The Azure Region in which the Key Vault managed Hardware Security Module exists.

name String
purgeProtectionEnabled Boolean

Is purge protection enabled on this Key Vault Managed Hardware Security Module?

resourceGroupName String
skuName String

The Name of the SKU used for this Key Vault Managed Hardware Security Module.

softDeleteRetentionDays Integer

The number of days that items should be retained for soft-deleted.

tags Map<String,String>

A mapping of tags assigned to the Key Vault Managed Hardware Security Module.

tenantId String

The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module.

adminObjectIds string[]

Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module.

hsmUri string

The URI of the Hardware Security Module for performing operations on keys and secrets.

id string

The provider-assigned unique ID for this managed resource.

location string

The Azure Region in which the Key Vault managed Hardware Security Module exists.

name string
purgeProtectionEnabled boolean

Is purge protection enabled on this Key Vault Managed Hardware Security Module?

resourceGroupName string
skuName string

The Name of the SKU used for this Key Vault Managed Hardware Security Module.

softDeleteRetentionDays number

The number of days that items should be retained for soft-deleted.

tags {[key: string]: string}

A mapping of tags assigned to the Key Vault Managed Hardware Security Module.

tenantId string

The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module.

admin_object_ids Sequence[str]

Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module.

hsm_uri str

The URI of the Hardware Security Module for performing operations on keys and secrets.

id str

The provider-assigned unique ID for this managed resource.

location str

The Azure Region in which the Key Vault managed Hardware Security Module exists.

name str
purge_protection_enabled bool

Is purge protection enabled on this Key Vault Managed Hardware Security Module?

resource_group_name str
sku_name str

The Name of the SKU used for this Key Vault Managed Hardware Security Module.

soft_delete_retention_days int

The number of days that items should be retained for soft-deleted.

tags Mapping[str, str]

A mapping of tags assigned to the Key Vault Managed Hardware Security Module.

tenant_id str

The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module.

adminObjectIds List<String>

Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module.

hsmUri String

The URI of the Hardware Security Module for performing operations on keys and secrets.

id String

The provider-assigned unique ID for this managed resource.

location String

The Azure Region in which the Key Vault managed Hardware Security Module exists.

name String
purgeProtectionEnabled Boolean

Is purge protection enabled on this Key Vault Managed Hardware Security Module?

resourceGroupName String
skuName String

The Name of the SKU used for this Key Vault Managed Hardware Security Module.

softDeleteRetentionDays Number

The number of days that items should be retained for soft-deleted.

tags Map<String>

A mapping of tags assigned to the Key Vault Managed Hardware Security Module.

tenantId String

The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.