AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.kms.getCustomKeyStore
Explore with Pulumi AI
Use this data source to get the metadata KMS custom key store. By using this data source, you can reference KMS custom key store without having to hard code the ID as input.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const keystore = aws.kms.getCustomKeyStore({
    customKeyStoreName: "my_cloudhsm",
});
import pulumi
import pulumi_aws as aws
keystore = aws.kms.get_custom_key_store(custom_key_store_name="my_cloudhsm")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kms.LookupCustomKeyStore(ctx, &kms.LookupCustomKeyStoreArgs{
			CustomKeyStoreName: pulumi.StringRef("my_cloudhsm"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var keystore = Aws.Kms.GetCustomKeyStore.Invoke(new()
    {
        CustomKeyStoreName = "my_cloudhsm",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kms.KmsFunctions;
import com.pulumi.aws.kms.inputs.GetCustomKeyStoreArgs;
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 keystore = KmsFunctions.getCustomKeyStore(GetCustomKeyStoreArgs.builder()
            .customKeyStoreName("my_cloudhsm")
            .build());
    }
}
variables:
  keystore:
    fn::invoke:
      function: aws:kms:getCustomKeyStore
      arguments:
        customKeyStoreName: my_cloudhsm
Using getCustomKeyStore
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 getCustomKeyStore(args: GetCustomKeyStoreArgs, opts?: InvokeOptions): Promise<GetCustomKeyStoreResult>
function getCustomKeyStoreOutput(args: GetCustomKeyStoreOutputArgs, opts?: InvokeOptions): Output<GetCustomKeyStoreResult>def get_custom_key_store(custom_key_store_id: Optional[str] = None,
                         custom_key_store_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCustomKeyStoreResult
def get_custom_key_store_output(custom_key_store_id: Optional[pulumi.Input[str]] = None,
                         custom_key_store_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCustomKeyStoreResult]func LookupCustomKeyStore(ctx *Context, args *LookupCustomKeyStoreArgs, opts ...InvokeOption) (*LookupCustomKeyStoreResult, error)
func LookupCustomKeyStoreOutput(ctx *Context, args *LookupCustomKeyStoreOutputArgs, opts ...InvokeOption) LookupCustomKeyStoreResultOutput> Note: This function is named LookupCustomKeyStore in the Go SDK.
public static class GetCustomKeyStore 
{
    public static Task<GetCustomKeyStoreResult> InvokeAsync(GetCustomKeyStoreArgs args, InvokeOptions? opts = null)
    public static Output<GetCustomKeyStoreResult> Invoke(GetCustomKeyStoreInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCustomKeyStoreResult> getCustomKeyStore(GetCustomKeyStoreArgs args, InvokeOptions options)
public static Output<GetCustomKeyStoreResult> getCustomKeyStore(GetCustomKeyStoreArgs args, InvokeOptions options)
fn::invoke:
  function: aws:kms/getCustomKeyStore:getCustomKeyStore
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CustomKey stringStore Id 
- The ID for the custom key store.
- CustomKey stringStore Name 
- The user-specified friendly name for the custom key store.
- CustomKey stringStore Id 
- The ID for the custom key store.
- CustomKey stringStore Name 
- The user-specified friendly name for the custom key store.
- customKey StringStore Id 
- The ID for the custom key store.
- customKey StringStore Name 
- The user-specified friendly name for the custom key store.
- customKey stringStore Id 
- The ID for the custom key store.
- customKey stringStore Name 
- The user-specified friendly name for the custom key store.
- custom_key_ strstore_ id 
- The ID for the custom key store.
- custom_key_ strstore_ name 
- The user-specified friendly name for the custom key store.
- customKey StringStore Id 
- The ID for the custom key store.
- customKey StringStore Name 
- The user-specified friendly name for the custom key store.
getCustomKeyStore Result
The following output properties are available:
- CloudHsm stringCluster Id 
- ConnectionState string
- Indicates whether the custom key store is connected to its CloudHSM cluster.
- CreationDate string
- The date and time when the custom key store was created.
- CustomKey stringStore Id 
- CustomKey stringStore Name 
- Id string
- The provider-assigned unique ID for this managed resource.
- TrustAnchor stringCertificate 
- The trust anchor certificate of the associated CloudHSM cluster.
- CloudHsm stringCluster Id 
- ConnectionState string
- Indicates whether the custom key store is connected to its CloudHSM cluster.
- CreationDate string
- The date and time when the custom key store was created.
- CustomKey stringStore Id 
- CustomKey stringStore Name 
- Id string
- The provider-assigned unique ID for this managed resource.
- TrustAnchor stringCertificate 
- The trust anchor certificate of the associated CloudHSM cluster.
- cloudHsm StringCluster Id 
- connectionState String
- Indicates whether the custom key store is connected to its CloudHSM cluster.
- creationDate String
- The date and time when the custom key store was created.
- customKey StringStore Id 
- customKey StringStore Name 
- id String
- The provider-assigned unique ID for this managed resource.
- trustAnchor StringCertificate 
- The trust anchor certificate of the associated CloudHSM cluster.
- cloudHsm stringCluster Id 
- connectionState string
- Indicates whether the custom key store is connected to its CloudHSM cluster.
- creationDate string
- The date and time when the custom key store was created.
- customKey stringStore Id 
- customKey stringStore Name 
- id string
- The provider-assigned unique ID for this managed resource.
- trustAnchor stringCertificate 
- The trust anchor certificate of the associated CloudHSM cluster.
- cloud_hsm_ strcluster_ id 
- connection_state str
- Indicates whether the custom key store is connected to its CloudHSM cluster.
- creation_date str
- The date and time when the custom key store was created.
- custom_key_ strstore_ id 
- custom_key_ strstore_ name 
- id str
- The provider-assigned unique ID for this managed resource.
- trust_anchor_ strcertificate 
- The trust anchor certificate of the associated CloudHSM cluster.
- cloudHsm StringCluster Id 
- connectionState String
- Indicates whether the custom key store is connected to its CloudHSM cluster.
- creationDate String
- The date and time when the custom key store was created.
- customKey StringStore Id 
- customKey StringStore Name 
- id String
- The provider-assigned unique ID for this managed resource.
- trustAnchor StringCertificate 
- The trust anchor certificate of the associated CloudHSM cluster.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.