You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform module to create an Amazon KMS Key or Replica KMS key including optional integration with Mozilla SOPS.
Amazon Key Management Service (KMS) makes it easy for you to create and manage cryptographic keys and control their use across a wide range of AWS services and in your applications. AWS KMS is a secure and resilient service that uses hardware security modules that have been validated under FIPS 140-2, or are in the process of being validated, to protect your keys. AWS KMS is integrated with AWS CloudTrail to provide you with logs of all key usage to help meet your regulatory and compliance needs.
Module Capabilities
(Optional) Create a primary KMS key in either single/multi-region.
(Optional) Create a replica KMS key in a different region of the primary multi-region KMS key.
(Optional) Create a corresponding SOPS file containing the primary KMS or replica KMS arn.
(Optional) Create a KMS Grant including encryption constraints.
Examples
Look at our complete Terraform examples where you can get a better context of usage for various scenarios. The Terragrunt example can be viewed directly from GitHub.
Assumptions
(Replica KMS Keys)
The primary KMS key you initially created was created as a multi-region KMS key.
Usage
You can create a primary KMS key or a replica of a multi-region primary KMS key for use with the Mozilla SOPS tool. The module will create the key and gives you an option to also create a kms-sops.yaml for you to use with the SOPS tool for encrypting and decrypting files.
Special Notes
(Single/Multi-Region)
You may create a single region KMS key but please be aware that you will not be able to create a replica of that key. Only multi-region primary KMS keys can have replicas.