We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.keyvault.getManagedHardwareSecurityModule
Explore with Pulumi AI
Use this data source to access information about an existing Key Vault Managed Hardware Security Module.
Example Usage
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);
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)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.KeyVault.GetManagedHardwareSecurityModule.Invoke(new()
    {
        Name = "mykeyvaultHsm",
        ResourceGroupName = "some-resource-group",
    });
    return new Dictionary<string, object?>
    {
        ["hsmUri"] = example.Apply(getManagedHardwareSecurityModuleResult => getManagedHardwareSecurityModuleResult.HsmUri),
    };
});
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()));
    }
}
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)
public static Output<GetManagedHardwareSecurityModuleResult> getManagedHardwareSecurityModule(GetManagedHardwareSecurityModuleArgs args, InvokeOptions options)
fn::invoke:
  function: azure:keyvault/getManagedHardwareSecurityModule:getManagedHardwareSecurityModule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Key Vault Managed Hardware Security Module.
- ResourceGroup stringName 
- 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.
- ResourceGroup stringName 
- 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.
- resourceGroup StringName 
- 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.
- resourceGroup stringName 
- 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_ strname 
- 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.
- resourceGroup StringName 
- The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists.
getManagedHardwareSecurityModule Result
The following output properties are available:
- AdminObject List<string>Ids 
- 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
- PurgeProtection boolEnabled 
- Is purge protection enabled on this Key Vault Managed Hardware Security Module?
- ResourceGroup stringName 
- SkuName string
- The Name of the SKU used for this Key Vault Managed Hardware Security Module.
- SoftDelete intRetention Days 
- The number of days that items should be retained for soft-deleted.
- 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.
- AdminObject []stringIds 
- 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
- PurgeProtection boolEnabled 
- Is purge protection enabled on this Key Vault Managed Hardware Security Module?
- ResourceGroup stringName 
- SkuName string
- The Name of the SKU used for this Key Vault Managed Hardware Security Module.
- SoftDelete intRetention Days 
- The number of days that items should be retained for soft-deleted.
- 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.
- adminObject List<String>Ids 
- 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
- purgeProtection BooleanEnabled 
- Is purge protection enabled on this Key Vault Managed Hardware Security Module?
- resourceGroup StringName 
- skuName String
- The Name of the SKU used for this Key Vault Managed Hardware Security Module.
- softDelete IntegerRetention Days 
- The number of days that items should be retained for soft-deleted.
- 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.
- adminObject string[]Ids 
- 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
- purgeProtection booleanEnabled 
- Is purge protection enabled on this Key Vault Managed Hardware Security Module?
- resourceGroup stringName 
- skuName string
- The Name of the SKU used for this Key Vault Managed Hardware Security Module.
- softDelete numberRetention Days 
- The number of days that items should be retained for soft-deleted.
- {[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_ Sequence[str]ids 
- 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_ boolenabled 
- Is purge protection enabled on this Key Vault Managed Hardware Security Module?
- resource_group_ strname 
- sku_name str
- The Name of the SKU used for this Key Vault Managed Hardware Security Module.
- soft_delete_ intretention_ days 
- The number of days that items should be retained for soft-deleted.
- 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.
- adminObject List<String>Ids 
- 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
- purgeProtection BooleanEnabled 
- Is purge protection enabled on this Key Vault Managed Hardware Security Module?
- resourceGroup StringName 
- skuName String
- The Name of the SKU used for this Key Vault Managed Hardware Security Module.
- softDelete NumberRetention Days 
- The number of days that items should be retained for soft-deleted.
- 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
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.