https://github.com/geekcell/terraform-aws-kms
Terraform module to provision AWS KMS.
https://github.com/geekcell/terraform-aws-kms
aws kms terraform terraform-module
Last synced: 9 months ago
JSON representation
Terraform module to provision AWS KMS.
- Host: GitHub
- URL: https://github.com/geekcell/terraform-aws-kms
- Owner: geekcell
- License: apache-2.0
- Created: 2022-11-10T13:49:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-28T07:37:55.000Z (about 3 years ago)
- Last Synced: 2025-10-01T22:56:49.336Z (9 months ago)
- Topics: aws, kms, terraform, terraform-module
- Language: HCL
- Homepage: https://www.geekcell.io
- Size: 64.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.geekcell.io/)
### Code Quality
[](https://github.com/geekcell/terraform-aws-kms/blob/master/LICENSE)
[](https://github.com/geekcell/terraform-aws-kms/releases)
[](https://github.com/geekcell/terraform-aws-kms/actions/workflows/release.yaml)
[](https://github.com/geekcell/terraform-aws-kms/actions/workflows/validate.yaml)
[](https://github.com/geekcell/terraform-aws-kms/actions/workflows/linter.yaml)
### Security
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=INFRASTRUCTURE+SECURITY)
#### Cloud
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+AWS+V1.2)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+AWS+V1.3)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+AZURE+V1.1)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+AZURE+V1.3)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+GCP+V1.1)
##### Container
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+KUBERNETES+V1.6)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+EKS+V1.1)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+GKE+V1.1)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=CIS+KUBERNETES+V1.5)
#### Data protection
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=SOC2)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=PCI-DSS+V3.2)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=PCI-DSS+V3.2.1)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=ISO27001)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=NIST-800-53)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=HIPAA)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-kms&benchmark=FEDRAMP+%28MODERATE%29)
# Terraform AWS KMS Module
Terraform module which creates a KMS key and an alias that belongs to it.
The focus on this module lies within it's simplicity by providing default values
that should make sense for most use cases.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [alias](#input\_alias) | The display name of the alias. | `string` | n/a | yes |
| [customer\_master\_key\_spec](#input\_customer\_master\_key\_spec) | Specifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. | `string` | `"SYMMETRIC_DEFAULT"` | no |
| [deletion\_window\_in\_days](#input\_deletion\_window\_in\_days) | The waiting period, specified in number of days. | `number` | `30` | no |
| [description](#input\_description) | The description of the key as viewed in AWS console. | `string` | `"Customer Managed Key"` | no |
| [enable\_key\_rotation](#input\_enable\_key\_rotation) | Specifies whether key rotation is enabled. | `bool` | `true` | no |
| [key\_usage](#input\_key\_usage) | Specifies the intended use of the key. | `string` | `"ENCRYPT_DECRYPT"` | no |
| [multi\_region](#input\_multi\_region) | Indicates whether the KMS key is a multi-Region. | `bool` | `false` | no |
| [policy](#input\_policy) | A valid policy JSON document. | `string` | `null` | no |
| [tags](#input\_tags) | Tags to add to the AWS Customer Managed Key. | `map(any)` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| [alias\_arn](#output\_alias\_arn) | Alias ARN |
| [alias\_name](#output\_alias\_name) | Alias name |
| [key\_arn](#output\_key\_arn) | Key ARN |
| [key\_id](#output\_key\_id) | Key Id |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.36 |
## Resources
- resource.aws_kms_alias.main (main.tf#20)
- resource.aws_kms_key.main (main.tf#8)
# Examples
### Full
```hcl
module "full" {
source = "../../"
alias = "application-rds"
}
```