1. Packages
  2. AWS
  3. API Docs
  4. kms
  5. ReplicaExternalKey
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.kms.ReplicaExternalKey

Explore with Pulumi AI

Manages a KMS multi-Region replica key that uses external key material. See the AWS KMS Developer Guide for more information on importing key material into multi-Region keys.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const primary = new aws.kms.ExternalKey("primary", {
    description: "Multi-Region primary key",
    deletionWindowInDays: 30,
    multiRegion: true,
    enabled: true,
    keyMaterialBase64: "...",
});
const replica = new aws.kms.ReplicaExternalKey("replica", {
    description: "Multi-Region replica key",
    deletionWindowInDays: 7,
    primaryKeyArn: primaryAwsKmsExternal.arn,
    keyMaterialBase64: "...",
});
Copy
import pulumi
import pulumi_aws as aws

primary = aws.kms.ExternalKey("primary",
    description="Multi-Region primary key",
    deletion_window_in_days=30,
    multi_region=True,
    enabled=True,
    key_material_base64="...")
replica = aws.kms.ReplicaExternalKey("replica",
    description="Multi-Region replica key",
    deletion_window_in_days=7,
    primary_key_arn=primary_aws_kms_external["arn"],
    key_material_base64="...")
Copy
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.NewExternalKey(ctx, "primary", &kms.ExternalKeyArgs{
			Description:          pulumi.String("Multi-Region primary key"),
			DeletionWindowInDays: pulumi.Int(30),
			MultiRegion:          pulumi.Bool(true),
			Enabled:              pulumi.Bool(true),
			KeyMaterialBase64:    pulumi.String("..."),
		})
		if err != nil {
			return err
		}
		_, err = kms.NewReplicaExternalKey(ctx, "replica", &kms.ReplicaExternalKeyArgs{
			Description:          pulumi.String("Multi-Region replica key"),
			DeletionWindowInDays: pulumi.Int(7),
			PrimaryKeyArn:        pulumi.Any(primaryAwsKmsExternal.Arn),
			KeyMaterialBase64:    pulumi.String("..."),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var primary = new Aws.Kms.ExternalKey("primary", new()
    {
        Description = "Multi-Region primary key",
        DeletionWindowInDays = 30,
        MultiRegion = true,
        Enabled = true,
        KeyMaterialBase64 = "...",
    });

    var replica = new Aws.Kms.ReplicaExternalKey("replica", new()
    {
        Description = "Multi-Region replica key",
        DeletionWindowInDays = 7,
        PrimaryKeyArn = primaryAwsKmsExternal.Arn,
        KeyMaterialBase64 = "...",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kms.ExternalKey;
import com.pulumi.aws.kms.ExternalKeyArgs;
import com.pulumi.aws.kms.ReplicaExternalKey;
import com.pulumi.aws.kms.ReplicaExternalKeyArgs;
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) {
        var primary = new ExternalKey("primary", ExternalKeyArgs.builder()
            .description("Multi-Region primary key")
            .deletionWindowInDays(30)
            .multiRegion(true)
            .enabled(true)
            .keyMaterialBase64("...")
            .build());

        var replica = new ReplicaExternalKey("replica", ReplicaExternalKeyArgs.builder()
            .description("Multi-Region replica key")
            .deletionWindowInDays(7)
            .primaryKeyArn(primaryAwsKmsExternal.arn())
            .keyMaterialBase64("...")
            .build());

    }
}
Copy
resources:
  primary:
    type: aws:kms:ExternalKey
    properties:
      description: Multi-Region primary key
      deletionWindowInDays: 30
      multiRegion: true
      enabled: true
      keyMaterialBase64: '...'
  replica:
    type: aws:kms:ReplicaExternalKey
    properties:
      description: Multi-Region replica key
      deletionWindowInDays: 7
      primaryKeyArn: ${primaryAwsKmsExternal.arn}
      keyMaterialBase64: '...'
Copy

Create ReplicaExternalKey Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ReplicaExternalKey(name: string, args: ReplicaExternalKeyArgs, opts?: CustomResourceOptions);
@overload
def ReplicaExternalKey(resource_name: str,
                       args: ReplicaExternalKeyArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def ReplicaExternalKey(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       primary_key_arn: Optional[str] = None,
                       bypass_policy_lockout_safety_check: Optional[bool] = None,
                       deletion_window_in_days: Optional[int] = None,
                       description: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       key_material_base64: Optional[str] = None,
                       policy: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       valid_to: Optional[str] = None)
func NewReplicaExternalKey(ctx *Context, name string, args ReplicaExternalKeyArgs, opts ...ResourceOption) (*ReplicaExternalKey, error)
public ReplicaExternalKey(string name, ReplicaExternalKeyArgs args, CustomResourceOptions? opts = null)
public ReplicaExternalKey(String name, ReplicaExternalKeyArgs args)
public ReplicaExternalKey(String name, ReplicaExternalKeyArgs args, CustomResourceOptions options)
type: aws:kms:ReplicaExternalKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ReplicaExternalKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ReplicaExternalKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ReplicaExternalKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ReplicaExternalKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ReplicaExternalKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var replicaExternalKeyResource = new Aws.Kms.ReplicaExternalKey("replicaExternalKeyResource", new()
{
    PrimaryKeyArn = "string",
    BypassPolicyLockoutSafetyCheck = false,
    DeletionWindowInDays = 0,
    Description = "string",
    Enabled = false,
    KeyMaterialBase64 = "string",
    Policy = "string",
    Tags = 
    {
        { "string", "string" },
    },
    ValidTo = "string",
});
Copy
example, err := kms.NewReplicaExternalKey(ctx, "replicaExternalKeyResource", &kms.ReplicaExternalKeyArgs{
	PrimaryKeyArn:                  pulumi.String("string"),
	BypassPolicyLockoutSafetyCheck: pulumi.Bool(false),
	DeletionWindowInDays:           pulumi.Int(0),
	Description:                    pulumi.String("string"),
	Enabled:                        pulumi.Bool(false),
	KeyMaterialBase64:              pulumi.String("string"),
	Policy:                         pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	ValidTo: pulumi.String("string"),
})
Copy
var replicaExternalKeyResource = new ReplicaExternalKey("replicaExternalKeyResource", ReplicaExternalKeyArgs.builder()
    .primaryKeyArn("string")
    .bypassPolicyLockoutSafetyCheck(false)
    .deletionWindowInDays(0)
    .description("string")
    .enabled(false)
    .keyMaterialBase64("string")
    .policy("string")
    .tags(Map.of("string", "string"))
    .validTo("string")
    .build());
Copy
replica_external_key_resource = aws.kms.ReplicaExternalKey("replicaExternalKeyResource",
    primary_key_arn="string",
    bypass_policy_lockout_safety_check=False,
    deletion_window_in_days=0,
    description="string",
    enabled=False,
    key_material_base64="string",
    policy="string",
    tags={
        "string": "string",
    },
    valid_to="string")
Copy
const replicaExternalKeyResource = new aws.kms.ReplicaExternalKey("replicaExternalKeyResource", {
    primaryKeyArn: "string",
    bypassPolicyLockoutSafetyCheck: false,
    deletionWindowInDays: 0,
    description: "string",
    enabled: false,
    keyMaterialBase64: "string",
    policy: "string",
    tags: {
        string: "string",
    },
    validTo: "string",
});
Copy
type: aws:kms:ReplicaExternalKey
properties:
    bypassPolicyLockoutSafetyCheck: false
    deletionWindowInDays: 0
    description: string
    enabled: false
    keyMaterialBase64: string
    policy: string
    primaryKeyArn: string
    tags:
        string: string
    validTo: string
Copy

ReplicaExternalKey Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ReplicaExternalKey resource accepts the following input properties:

PrimaryKeyArn
This property is required.
Changes to this property will trigger replacement.
string
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
BypassPolicyLockoutSafetyCheck bool
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
DeletionWindowInDays int
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
Description string
A description of the KMS key.
Enabled bool
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
KeyMaterialBase64 Changes to this property will trigger replacement. string
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
Policy string
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
Tags Dictionary<string, string>
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
ValidTo string
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
PrimaryKeyArn
This property is required.
Changes to this property will trigger replacement.
string
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
BypassPolicyLockoutSafetyCheck bool
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
DeletionWindowInDays int
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
Description string
A description of the KMS key.
Enabled bool
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
KeyMaterialBase64 Changes to this property will trigger replacement. string
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
Policy string
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
Tags map[string]string
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
ValidTo string
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
primaryKeyArn
This property is required.
Changes to this property will trigger replacement.
String
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
bypassPolicyLockoutSafetyCheck Boolean
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletionWindowInDays Integer
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description String
A description of the KMS key.
enabled Boolean
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
keyMaterialBase64 Changes to this property will trigger replacement. String
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
policy String
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
tags Map<String,String>
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
validTo String
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
primaryKeyArn
This property is required.
Changes to this property will trigger replacement.
string
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
bypassPolicyLockoutSafetyCheck boolean
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletionWindowInDays number
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description string
A description of the KMS key.
enabled boolean
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
keyMaterialBase64 Changes to this property will trigger replacement. string
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
policy string
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
tags {[key: string]: string}
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
validTo string
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
primary_key_arn
This property is required.
Changes to this property will trigger replacement.
str
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
bypass_policy_lockout_safety_check bool
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletion_window_in_days int
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description str
A description of the KMS key.
enabled bool
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
key_material_base64 Changes to this property will trigger replacement. str
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
policy str
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
tags Mapping[str, str]
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
valid_to str
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
primaryKeyArn
This property is required.
Changes to this property will trigger replacement.
String
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
bypassPolicyLockoutSafetyCheck Boolean
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletionWindowInDays Number
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description String
A description of the KMS key.
enabled Boolean
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
keyMaterialBase64 Changes to this property will trigger replacement. String
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
policy String
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
tags Map<String>
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
validTo String
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)

Outputs

All input properties are implicitly available as output properties. Additionally, the ReplicaExternalKey resource produces the following output properties:

Arn string
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
ExpirationModel string
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
Id string
The provider-assigned unique ID for this managed resource.
KeyId string
The key ID of the replica key. Related multi-Region keys have the same key ID.
KeyState string
The state of the replica key.
KeyUsage string
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
ExpirationModel string
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
Id string
The provider-assigned unique ID for this managed resource.
KeyId string
The key ID of the replica key. Related multi-Region keys have the same key ID.
KeyState string
The state of the replica key.
KeyUsage string
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
expirationModel String
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
id String
The provider-assigned unique ID for this managed resource.
keyId String
The key ID of the replica key. Related multi-Region keys have the same key ID.
keyState String
The state of the replica key.
keyUsage String
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
expirationModel string
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
id string
The provider-assigned unique ID for this managed resource.
keyId string
The key ID of the replica key. Related multi-Region keys have the same key ID.
keyState string
The state of the replica key.
keyUsage string
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
expiration_model str
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
id str
The provider-assigned unique ID for this managed resource.
key_id str
The key ID of the replica key. Related multi-Region keys have the same key ID.
key_state str
The state of the replica key.
key_usage str
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
expirationModel String
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
id String
The provider-assigned unique ID for this managed resource.
keyId String
The key ID of the replica key. Related multi-Region keys have the same key ID.
keyState String
The state of the replica key.
keyUsage String
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing ReplicaExternalKey Resource

Get an existing ReplicaExternalKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ReplicaExternalKeyState, opts?: CustomResourceOptions): ReplicaExternalKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        bypass_policy_lockout_safety_check: Optional[bool] = None,
        deletion_window_in_days: Optional[int] = None,
        description: Optional[str] = None,
        enabled: Optional[bool] = None,
        expiration_model: Optional[str] = None,
        key_id: Optional[str] = None,
        key_material_base64: Optional[str] = None,
        key_state: Optional[str] = None,
        key_usage: Optional[str] = None,
        policy: Optional[str] = None,
        primary_key_arn: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        valid_to: Optional[str] = None) -> ReplicaExternalKey
func GetReplicaExternalKey(ctx *Context, name string, id IDInput, state *ReplicaExternalKeyState, opts ...ResourceOption) (*ReplicaExternalKey, error)
public static ReplicaExternalKey Get(string name, Input<string> id, ReplicaExternalKeyState? state, CustomResourceOptions? opts = null)
public static ReplicaExternalKey get(String name, Output<String> id, ReplicaExternalKeyState state, CustomResourceOptions options)
resources:  _:    type: aws:kms:ReplicaExternalKey    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
BypassPolicyLockoutSafetyCheck bool
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
DeletionWindowInDays int
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
Description string
A description of the KMS key.
Enabled bool
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
ExpirationModel string
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
KeyId string
The key ID of the replica key. Related multi-Region keys have the same key ID.
KeyMaterialBase64 Changes to this property will trigger replacement. string
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
KeyState string
The state of the replica key.
KeyUsage string
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
Policy string
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
PrimaryKeyArn Changes to this property will trigger replacement. string
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
Tags Dictionary<string, string>
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

ValidTo string
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
Arn string
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
BypassPolicyLockoutSafetyCheck bool
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
DeletionWindowInDays int
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
Description string
A description of the KMS key.
Enabled bool
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
ExpirationModel string
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
KeyId string
The key ID of the replica key. Related multi-Region keys have the same key ID.
KeyMaterialBase64 Changes to this property will trigger replacement. string
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
KeyState string
The state of the replica key.
KeyUsage string
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
Policy string
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
PrimaryKeyArn Changes to this property will trigger replacement. string
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
Tags map[string]string
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

ValidTo string
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
arn String
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
bypassPolicyLockoutSafetyCheck Boolean
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletionWindowInDays Integer
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description String
A description of the KMS key.
enabled Boolean
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
expirationModel String
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
keyId String
The key ID of the replica key. Related multi-Region keys have the same key ID.
keyMaterialBase64 Changes to this property will trigger replacement. String
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
keyState String
The state of the replica key.
keyUsage String
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
policy String
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
primaryKeyArn Changes to this property will trigger replacement. String
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
tags Map<String,String>
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

validTo String
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
arn string
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
bypassPolicyLockoutSafetyCheck boolean
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletionWindowInDays number
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description string
A description of the KMS key.
enabled boolean
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
expirationModel string
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
keyId string
The key ID of the replica key. Related multi-Region keys have the same key ID.
keyMaterialBase64 Changes to this property will trigger replacement. string
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
keyState string
The state of the replica key.
keyUsage string
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
policy string
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
primaryKeyArn Changes to this property will trigger replacement. string
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
tags {[key: string]: string}
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

validTo string
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
arn str
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
bypass_policy_lockout_safety_check bool
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletion_window_in_days int
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description str
A description of the KMS key.
enabled bool
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
expiration_model str
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
key_id str
The key ID of the replica key. Related multi-Region keys have the same key ID.
key_material_base64 Changes to this property will trigger replacement. str
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
key_state str
The state of the replica key.
key_usage str
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
policy str
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
primary_key_arn Changes to this property will trigger replacement. str
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
tags Mapping[str, str]
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

valid_to str
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)
arn String
The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value.
bypassPolicyLockoutSafetyCheck Boolean
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false.
deletionWindowInDays Number
The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30.
description String
A description of the KMS key.
enabled Boolean
Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be false. Imported keys default to true unless expired.
expirationModel String
Whether the key material expires. Empty when pending key material import, otherwise KEY_MATERIAL_EXPIRES or KEY_MATERIAL_DOES_NOT_EXPIRE.
keyId String
The key ID of the replica key. Related multi-Region keys have the same key ID.
keyMaterialBase64 Changes to this property will trigger replacement. String
Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be reimported, but you cannot import different key material.
keyState String
The state of the replica key.
keyUsage String
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
policy String
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.
primaryKeyArn Changes to this property will trigger replacement. String
The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region.
tags Map<String>
A map of tags to assign to the replica key. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

validTo String
Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)

Import

Using pulumi import, import KMS multi-Region replica keys using the id. For example:

$ pulumi import aws:kms/replicaExternalKey:ReplicaExternalKey example 1234abcd-12ab-34cd-56ef-1234567890ab
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.