import * as core from "@terrascript/core"; export interface ReplicaKeyArgs extends core.ResourceArgs { /** * (Optional) A flag to indicate whether to bypass the key policy lockout safety check. */ bypassPolicyLockoutSafetyCheck?: boolean | core.BooleanOut; /** * (Optional) The waiting period, specified in number of days. After the waiting period ends, AWS KMS d * eletes the KMS key. */ deletionWindowInDays?: number | core.NumberOut; /** * (Optional) A description of the KMS key. */ description?: string | core.StringOut; /** * (Optional) Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptog * raphic operations. The default value is `true`. */ enabled?: boolean | core.BooleanOut; /** * (Optional) The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS atta * ches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.htm * l#key-policy-default) to the KMS key. */ policy?: string | core.StringOut; /** * (Required) The ARN of the multi-Region primary key to replicate. The primary key must be in a differ * ent AWS Region of the same AWS Partition. You can create only one replica of a given primary key in * each AWS Region. */ primaryKeyArn: string | core.StringOut; /** * (Optional) A map of tags to assign to the replica key. If configured with a provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags * configuration-block) present, tags with matching keys will overwrite those defined at the provider- * level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class ReplicaKey extends core.Resource { /** * The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ * only in the Region value. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) A flag to indicate whether to bypass the key policy lockout safety check. */ @core.attr(Boolean) public bypassPolicyLockoutSafetyCheck?: boolean | core.BooleanOut; /** * (Optional) The waiting period, specified in number of days. After the waiting period ends, AWS KMS d * eletes the KMS key. */ @core.attr(Number) public deletionWindowInDays?: number | core.NumberOut; /** * (Optional) A description of the KMS key. */ @core.attr(String) public description?: string | core.StringOut; /** * (Optional) Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptog * raphic operations. The default value is `true`. */ @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * The key ID of the replica key. Related multi-Region keys have the same key ID. */ @core.attr(String, { computed: true }) public keyId!: string | core.StringOut; /** * A Boolean value that specifies whether key rotation is enabled. This is a shared property of multi-R * egion keys. */ @core.attr(Boolean, { computed: true }) public keyRotationEnabled!: boolean | core.BooleanOut; /** * The type of key material in the KMS key. This is a shared property of multi-Region keys. */ @core.attr(String, { computed: true }) public keySpec!: string | core.StringOut; /** * The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#c * ryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Regio * n keys. */ @core.attr(String, { computed: true }) public keyUsage!: string | core.StringOut; /** * (Optional) The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS atta * ches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.htm * l#key-policy-default) to the KMS key. */ @core.attr(String, { computed: true }) public policy?: string | core.StringOut; /** * (Required) The ARN of the multi-Region primary key to replicate. The primary key must be in a differ * ent AWS Region of the same AWS Partition. You can create only one replica of a given primary key in * each AWS Region. */ @core.attr(String) public primaryKeyArn!: string | core.StringOut; /** * (Optional) A map of tags to assign to the replica key. If configured with a provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags * configuration-block) present, tags with matching keys will overwrite those defined at the provider- * level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; constructor(name: string, args?: ReplicaKeyArgs) { super(name, "aws_kms_replica_key", args); } public override getNamespace(): string { return "aws_kms"; } }