KMS
Terraform module to create AWS KMS resources
Inputs
40 / 41
aliasesoptionallist(string)A list of aliases to create. Note - due to the use of `toset()`, values must be static strings and not computed values
[]aliases_use_name_prefixoptionalboolDetermines whether the alias name is used as a prefix
falsebypass_policy_lockout_safety_checkoptionalboolA 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
nullcomputed_aliasesoptionalmap(object({ name = string }))A map of aliases to create. Values provided via the `name` key of the map can be computed from upstream resources
{}createoptionalboolDetermines whether resources will be created (affects all resources)
truecreate_externaloptionalboolDetermines whether an external CMK (externally provided material) will be created or a standard CMK (AWS provided material)
falsecreate_replicaoptionalboolDetermines whether a replica standard CMK will be created (AWS provided material)
falsecreate_replica_externaloptionalboolDetermines whether a replica external CMK will be created (externally provided material)
falsecustom_key_store_idoptionalstringID of the KMS Custom Key Store where the key will be stored instead of KMS (eg CloudHSM).
nullcustomer_master_key_specoptionalstringSpecifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. Valid values: `SYMMETRIC_DEFAULT`, `RSA_2048`, `RSA_3072`, `RSA_4096`, `HMAC_256`, `ECC_NIST_P256`, `ECC_NIST_P384`, `ECC_NIST_P521`, or `ECC_SECG_P…
nulldeletion_window_in_daysoptionalnumberThe 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`
nulldescriptionoptionalstringThe description of the key as viewed in AWS console
nullenable_default_policyoptionalboolSpecifies whether to enable the default key policy. Defaults to `true`
trueenable_key_rotationoptionalboolSpecifies whether key rotation is enabled. Defaults to `true`
trueenable_route53_dnssecoptionalboolDetermines whether the KMS policy used for Route53 DNSSEC signing is enabled
falsegrantsoptionalmap(object({ constraints = optional(list(object({ encryption_context_equals = op…A map of grant definitions to create
nullis_enabledoptionalboolSpecifies whether the key is enabled. Defaults to `true`
nullkey_administratorsoptionallist(string)A list of IAM ARNs for [key administrators](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-default-allow-administrators)
[]key_asymmetric_public_encryption_usersoptionallist(string)A list of IAM ARNs for [key asymmetric public encryption users](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-users-crypto)
[]key_asymmetric_sign_verify_usersoptionallist(string)A list of IAM ARNs for [key asymmetric sign and verify users](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-users-crypto)
[]key_hmac_usersoptionallist(string)A list of IAM ARNs for [key HMAC users](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-users-crypto)
[]key_material_base64optionalstringBase64 encoded 256-bit symmetric encryption key material to import. The CMK is permanently associated with this key material. External key only
nullkey_ownersoptionallist(string)A list of IAM ARNs for those who will have full key permissions (`kms:*`)
[]key_service_roles_for_autoscalingoptionallist(string)A list of IAM ARNs for [AWSServiceRoleForAutoScaling roles](https://docs.aws.amazon.com/autoscaling/ec2/userguide/key-policy-requirements-EBS-encryption.html#policy-example-cmk-access)
[]key_service_usersoptionallist(string)A list of IAM ARNs for [key service users](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-service-integration)
[]key_specoptionalstringSpecifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. Valid values: SYMMETRIC_DEFAULT, RSA_2048, RSA_3072, RSA_4096, HMAC_224, HMAC_256, HMAC_384, HMAC_512, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, …
nullkey_statementsoptionallist(object({ sid = optional(string) actions = optional(list(string)) not_action…A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage
nullkey_symmetric_encryption_usersoptionallist(string)A list of IAM ARNs for [key symmetric encryption users](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-users-crypto)
[]key_usageoptionalstringSpecifies the intended use of the key. Valid values: `ENCRYPT_DECRYPT` or `SIGN_VERIFY`. Defaults to `ENCRYPT_DECRYPT`
nullkey_usersoptionallist(string)A list of IAM ARNs for [key users](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#key-policy-default-allow-users)
[]multi_regionoptionalboolIndicates whether the KMS key is a multi-Region (`true`) or regional (`false`) key. Defaults to `false`
falseoverride_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`
[]policyoptionalstringA valid policy JSON document. Although this is a key policy, not an IAM policy, an `aws_iam_policy_document`, in the form that designates a principal, can be used
nullprimary_external_key_arnoptionalstringThe primary external key arn of a multi-region replica external key
nullprimary_key_arnoptionalstringThe primary key arn of a multi-region replica key
nullregionoptionalstringRegion where the resource(s) will be managed. Defaults to the Region set in the provider configuration
nullrotation_period_in_daysoptionalnumberCustom period of time between each rotation date. Must be a number between 90 and 2560 (inclusive)
nullroute53_dnssec_sourcesoptionallist(object({ account_ids = optional(list(string)) hosted_zone_arn = optional(st…A list of maps containing `account_ids` and Route53 `hosted_zone_arn` that will be allowed to sign DNSSEC records
nullsource_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s
[]tagsoptionalmap(string)A map of tags to add to all resources
{}All 41 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 1 are in the source.
Outputs
9
aliasesA map of aliases created and their attributes
external_key_expiration_modelWhether the key material expires. Empty when pending key material import, otherwise `KEY_MATERIAL_EXPIRES` or `KEY_MATERIAL_DOES_NOT_EXPIRE`
external_key_stateThe state of the CMK
external_key_usageThe cryptographic operations for which you can use the CMK
grantsA map of grants created and their attributes
key_arnThe Amazon Resource Name (ARN) of the key
key_idThe globally unique identifier for the key
key_policyThe IAM resource policy set on the key
key_regionThe region for the key
What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.