Try AWS Native preview for resources not in the classic version.
aws.kms.getCustomKeyStore
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:kms/getCustomKeyStore:getCustomKeyStore
arguments:
# arguments dictionary
The following arguments are supported:
- Custom
Key stringStore Id - The ID for the custom key store.
- Custom
Key stringStore Name - The user-specified friendly name for the custom key store.
- Custom
Key stringStore Id - The ID for the custom key store.
- Custom
Key stringStore Name - The user-specified friendly name for the custom key store.
- custom
Key StringStore Id - The ID for the custom key store.
- custom
Key StringStore Name - The user-specified friendly name for the custom key store.
- custom
Key stringStore Id - The ID for the custom key store.
- custom
Key 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.
- custom
Key StringStore Id - The ID for the custom key store.
- custom
Key StringStore Name - The user-specified friendly name for the custom key store.
getCustomKeyStore Result
The following output properties are available:
- Cloud
Hsm stringCluster Id - Connection
State string - Indicates whether the custom key store is connected to its CloudHSM cluster.
- Creation
Date string - The date and time when the custom key store was created.
- Custom
Key stringStore Id - Custom
Key stringStore Name - Id string
- The provider-assigned unique ID for this managed resource.
- Trust
Anchor stringCertificate - The trust anchor certificate of the associated CloudHSM cluster.
- Cloud
Hsm stringCluster Id - Connection
State string - Indicates whether the custom key store is connected to its CloudHSM cluster.
- Creation
Date string - The date and time when the custom key store was created.
- Custom
Key stringStore Id - Custom
Key stringStore Name - Id string
- The provider-assigned unique ID for this managed resource.
- Trust
Anchor stringCertificate - The trust anchor certificate of the associated CloudHSM cluster.
- cloud
Hsm StringCluster Id - connection
State String - Indicates whether the custom key store is connected to its CloudHSM cluster.
- creation
Date String - The date and time when the custom key store was created.
- custom
Key StringStore Id - custom
Key StringStore Name - id String
- The provider-assigned unique ID for this managed resource.
- trust
Anchor StringCertificate - The trust anchor certificate of the associated CloudHSM cluster.
- cloud
Hsm stringCluster Id - connection
State string - Indicates whether the custom key store is connected to its CloudHSM cluster.
- creation
Date string - The date and time when the custom key store was created.
- custom
Key stringStore Id - custom
Key stringStore Name - id string
- The provider-assigned unique ID for this managed resource.
- trust
Anchor 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.
- cloud
Hsm StringCluster Id - connection
State String - Indicates whether the custom key store is connected to its CloudHSM cluster.
- creation
Date String - The date and time when the custom key store was created.
- custom
Key StringStore Id - custom
Key StringStore Name - id String
- The provider-assigned unique ID for this managed resource.
- trust
Anchor 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
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.