get Custom Key Store
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",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
keystore = aws.kms.get_custom_key_store(custom_key_store_name="my_cloudhsm")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
keystore:
fn::invoke:
function: aws:kms:getCustomKeyStore
arguments:
customKeyStoreName: my_cloudhsm
Content copied to clipboard
Return
A collection of values returned by getCustomKeyStore.
Parameters
argument
A collection of arguments for invoking getCustomKeyStore.
suspend fun getCustomKeyStore(customKeyStoreId: String? = null, customKeyStoreName: String? = null): GetCustomKeyStoreResult
Return
A collection of values returned by getCustomKeyStore.
Parameters
custom Key Store Id
The ID for the custom key store.
custom Key Store Name
The user-specified friendly name for the custom key store.
See also
suspend fun getCustomKeyStore(argument: suspend GetCustomKeyStorePlainArgsBuilder.() -> Unit): GetCustomKeyStoreResult
Return
A collection of values returned by getCustomKeyStore.
Parameters
argument
Builder for com.pulumi.aws.kms.kotlin.inputs.GetCustomKeyStorePlainArgs.