UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

253 lines (252 loc) • 12.2 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a KMS multi-Region replica key. * * ## Example Usage * * ### AWS Provider v6 (and below) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const primary = new aws.kms.Key("primary", { * description: "Multi-Region primary key", * deletionWindowInDays: 30, * multiRegion: true, * }); * const replica = new aws.kms.ReplicaKey("replica", { * description: "Multi-Region replica key", * deletionWindowInDays: 7, * primaryKeyArn: primary.arn, * }); * ``` * * ### AWS Provider v7 (and above) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const primary = new aws.kms.Key("primary", { * region: "us-east-1", * description: "Multi-Region primary key", * deletionWindowInDays: 30, * multiRegion: true, * }); * const replica = new aws.kms.ReplicaKey("replica", { * description: "Multi-Region replica key", * deletionWindowInDays: 7, * primaryKeyArn: primary.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import KMS multi-Region replica keys using the `id`. For example: * * ```sh * $ pulumi import aws:kms/replicaKey:ReplicaKey example 1234abcd-12ab-34cd-56ef-1234567890ab * ``` */ export declare class ReplicaKey extends pulumi.CustomResource { /** * Get an existing ReplicaKey resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReplicaKeyState, opts?: pulumi.CustomResourceOptions): ReplicaKey; /** * Returns true if the given object is an instance of ReplicaKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ReplicaKey; /** * The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value. */ readonly arn: pulumi.Output<string>; /** * 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](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. * The default value is `false`. */ readonly bypassPolicyLockoutSafetyCheck: pulumi.Output<boolean | undefined>; /** * 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`. */ readonly deletionWindowInDays: pulumi.Output<number | undefined>; /** * A description of the KMS key. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. The default value is `true`. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * The key ID of the replica key. Related multi-Region keys have the same key ID. */ readonly keyId: pulumi.Output<string>; /** * A Boolean value that specifies whether key rotation is enabled. This is a shared property of multi-Region keys. */ readonly keyRotationEnabled: pulumi.Output<boolean>; /** * The type of key material in the KMS key. This is a shared property of multi-Region keys. */ readonly keySpec: pulumi.Output<string>; /** * The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys. */ readonly keyUsage: pulumi.Output<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](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. */ readonly policy: pulumi.Output<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. */ readonly primaryKeyArn: pulumi.Output<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Create a ReplicaKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ReplicaKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ReplicaKey resources. */ export interface ReplicaKeyState { /** * The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value. */ arn?: pulumi.Input<string>; /** * 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](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. * The default value is `false`. */ bypassPolicyLockoutSafetyCheck?: pulumi.Input<boolean>; /** * 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`. */ deletionWindowInDays?: pulumi.Input<number>; /** * A description of the KMS key. */ description?: pulumi.Input<string>; /** * Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. The default value is `true`. */ enabled?: pulumi.Input<boolean>; /** * The key ID of the replica key. Related multi-Region keys have the same key ID. */ keyId?: pulumi.Input<string>; /** * A Boolean value that specifies whether key rotation is enabled. This is a shared property of multi-Region keys. */ keyRotationEnabled?: pulumi.Input<boolean>; /** * The type of key material in the KMS key. This is a shared property of multi-Region keys. */ keySpec?: pulumi.Input<string>; /** * The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys. */ keyUsage?: pulumi.Input<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](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. */ policy?: pulumi.Input<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. */ primaryKeyArn?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; } /** * The set of arguments for constructing a ReplicaKey resource. */ export interface ReplicaKeyArgs { /** * 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](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. * The default value is `false`. */ bypassPolicyLockoutSafetyCheck?: pulumi.Input<boolean>; /** * 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`. */ deletionWindowInDays?: pulumi.Input<number>; /** * A description of the KMS key. */ description?: pulumi.Input<string>; /** * Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. The default value is `true`. */ enabled?: pulumi.Input<boolean>; /** * The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. */ policy?: pulumi.Input<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. */ primaryKeyArn: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }