1. Packages
  2. Azure Classic
  3. API Docs
  4. keyvault
  5. getManagedHardwareSecurityModule

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.keyvault.getManagedHardwareSecurityModule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    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/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
    	})
    }
    
    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)
    // 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
    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 v5.81.0 published on Monday, Jun 24, 2024 by Pulumi