KenkoGeek / tf-aws-kms-cmk

AWS KMS custom keys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preparing the environment

  1. Clone the repository using git
git clone the-repository/project
  1. Change to the project directory
cd project/
  1. Init the Terraform project
terraform init
  1. Validate the configurations files
terraform validate
  1. Lint the project

Installation guide for tflint -> https://github.com/terraform-linters/tflint

tflint
  1. Validate for security best practices

Installation guide for tfsec -> https://aquasecurity.github.io/tfsec/v1.28.1/guides/installation/

tfsec
  1. Give some format (just in case)
terraform fmt

Providers

Name Version
aws ~> 5.3.0

Requirements

Name Version
terraform ~> 1.5.0
aws ~> 5.3.0

Modules

No modules.

Resources

Name Type
aws_kms_alias.kms_alias resource
aws_kms_key.kms_key resource
aws_caller_identity.current data source

Inputs

Name Description Type Default Required
aws_region AWS region where the EC2 instance will be deployed string "us-east-1" no
deletion_window_in_days Deletion window in days number 30 no
enable_key_rotation Enable key rotation bool true no
multiregion Enable multi-region key bool false no
project_name Name of the project string "my-project" no
services Services to encrypt using the keys list(string)
[
"S3",
"RDS",
"MSK",
"CloudWatch",
"EBS"
]
no
tags Tags to apply to AWS resources map(string)
{
"Environment": "Development",
"Owner": "Frankin Garcia"
}
no

Outputs

Name Description
kms_key_arns ARNs of the created KMS keys with service names as a map

About

AWS KMS custom keys

License:MIT License


Languages

Language:HCL 100.0%