Skip to content

Commit

Permalink
Merge pull request #5 from aashishgoyal246/slave
Browse files Browse the repository at this point in the history
feat: Updated Files
  • Loading branch information
Sohan Yadav committed Apr 30, 2020
2 parents 73d48d2 + d5a8aad commit eca8d71
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ This module has a few dependencies:
Here is an example of how you can use this module in your inventory structure:
```hcl
module "kms_key" {
source = "git::https://github.com/clouddrove/terraform-aws-kms.git?ref=tags/0.12.4"
source = "git::https://github.com/clouddrove/terraform-aws-kms.git?ref=tags/0.12.4"
name = "kms"
application = "clouddrove"
environment = "test"
label_order = ["environment", "application", "name"]
enabled = true
description = "KMS key for cloudtrail"
deletion_window_in_days = 7
enable_key_rotation = true
Expand Down
1 change: 0 additions & 1 deletion _example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ provider "aws" {
module "kms_key" {
source = "./../"


name = "kms"
application = "clouddrove"
environment = "test"
Expand Down
17 changes: 9 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ module "labels" {
# Module : KMS KEY
# Description : This terraform module creates a KMS Customer Master Key (CMK) and its alias.
resource "aws_kms_key" "default" {
count = var.enabled ? 1 : 0
description = var.description
key_usage = var.key_usage
deletion_window_in_days = var.deletion_window_in_days
is_enabled = var.is_enabled
enable_key_rotation = var.enable_key_rotation
policy = var.policy
tags = module.labels.tags
count = var.enabled ? 1 : 0
description = var.description
key_usage = var.key_usage
deletion_window_in_days = var.deletion_window_in_days
is_enabled = var.is_enabled
enable_key_rotation = var.enable_key_rotation
customer_master_key_spec = var.customer_master_key_spec
policy = var.policy
tags = module.labels.tags
}

# Module : KMS ALIAS
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ variable "policy" {
default = ""
description = "A valid policy JSON document. For more information about building AWS IAM policy documents with Terraform."
}

variable "customer_master_key_spec" {
type = string
default = "SYMMETRIC_DEFAULT"
description = "Specifies 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, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, or ECC_SECG_P256K1. Defaults to SYMMETRIC_DEFAULT."
}

0 comments on commit eca8d71

Please sign in to comment.