Skip to content

Terraform module which creates a KMS Customer Master Key (CMK) and its alias.

License

Notifications You must be signed in to change notification settings

terraform-module/terraform-aws-kms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform AWS KMS

Terraform module to create fully feature KMS


Maintenance GitHub forks


Usage example

Here's the gist of using it directly from github.

module kms_chamber {
  source  = "terraform-module/kms/aws"
  version = "2.3.0"

  alias_name              = "parameter_store_key"
  description             = "Key to encrypt and decrypt secrets"

  tags = tomap({"used_by" = "chamber", "created_by" = "terraform"})
}

Assumptions

Available features

Module Variables

Inputs

Name Description Type Default Required
alias_name The name of the key alias string n/a yes
deletion_window_in_days The duration in days after which the key is deleted after destruction of the resource string "30" no
description The description of this KMS key string n/a yes
enable_key_rotation (Optional) Specifies whether key rotation is enabled. Defaults to false. bool "true" no
iam_policy The policy of the key usage string "null" no
is_enabled (Optional) Specifies whether the key is enabled. Defaults to true. bool "true" no
tags (Optional) A mapping of tags to assign to the object. map {} no

Outputs

Name Description
key_alias_arn The Amazon Resource Name (ARN) of the key alias
key_alias_name The display name of the alias.
key_arn The Amazon Resource Name (ARN) of the key.
key_id The globally unique identifier for the key.

Commands

$ make help
hooks                          Commit hooks setup
validate                       Validate with pre-commit hooks
changelog                      Update changelog
release                        Create release version

License

Copyright 2019 ivankatliarhcuk

MIT Licensed. See LICENSE for full details.

How to Contribute

Submit a pull request

Authors

Currently maintained by Ivan Katliarchuk and these awesome contributors.

Terraform Registry