From d78400e3f10062475102b3ba5c250a4325cca3cb Mon Sep 17 00:00:00 2001 From: anmolnagpal Date: Tue, 14 Jul 2020 22:02:36 +0530 Subject: [PATCH] updates --- main.tf | 4 +--- modules/autoscaling/main.tf | 2 -- modules/eks/main.tf | 6 ------ modules/eks/variables.tf | 12 ------------ modules/worker/main.tf | 1 - modules/worker/variables.tf | 5 ----- variables.tf | 11 ----------- 7 files changed, 1 insertion(+), 40 deletions(-) diff --git a/main.tf b/main.tf index ed1f56c..b5054fe 100644 --- a/main.tf +++ b/main.tf @@ -24,8 +24,7 @@ module "eks_cluster" { allowed_cidr_blocks = var.allowed_cidr_blocks_cluster enabled_cluster_log_types = var.enabled_cluster_log_types public_access_cidrs = var.public_access_cidrs - kms_key_arn = var.kms_key_arn - resources = var.resources + } #Module : EKS Worker @@ -74,7 +73,6 @@ module "eks_workers" { max_price = var.max_price volume_size = var.volume_size ebs_encryption = var.ebs_encryption - kms_key_arn = var.kms_key_arn volume_type = var.volume_type spot_instance_type = var.spot_instance_type wait_for_capacity_timeout = var.wait_for_capacity_timeout diff --git a/modules/autoscaling/main.tf b/modules/autoscaling/main.tf index fc34c07..1c688a8 100644 --- a/modules/autoscaling/main.tf +++ b/modules/autoscaling/main.tf @@ -29,7 +29,6 @@ resource "aws_launch_template" "on_demand" { ebs { volume_size = var.volume_size encrypted = var.ebs_encryption - kms_key_id = var.kms_key_arn volume_type = var.volume_type } } @@ -82,7 +81,6 @@ resource "aws_launch_template" "spot" { ebs { volume_size = var.volume_size encrypted = var.ebs_encryption - kms_key_id = var.kms_key_arn volume_type = var.volume_type } } diff --git a/modules/eks/main.tf b/modules/eks/main.tf index 5cb5040..09fa636 100644 --- a/modules/eks/main.tf +++ b/modules/eks/main.tf @@ -137,12 +137,6 @@ resource "aws_eks_cluster" "default" { public_access_cidrs = var.public_access_cidrs } - encryption_config { - provider { - key_arn = var.kms_key_arn - } - resources = var.resources - } depends_on = [ aws_iam_role_policy_attachment.amazon_eks_cluster_policy, diff --git a/modules/eks/variables.tf b/modules/eks/variables.tf index 3c671f8..176b17e 100644 --- a/modules/eks/variables.tf +++ b/modules/eks/variables.tf @@ -113,15 +113,3 @@ variable "public_access_cidrs" { default = [] description = "The list of cidr blocks to access AWS EKS cluster endpoint. Default [`0.0.0.0/0`]" } - -variable "resources" { - type = list(string) - default = [] - description = "List of strings with resources to be encrypted. Valid values: secrets" -} - -variable "kms_key_arn" { - type = string - default = "" - description = "The ARN of the KMS Key" -} \ No newline at end of file diff --git a/modules/worker/main.tf b/modules/worker/main.tf index 7d7c6e3..d17b23b 100644 --- a/modules/worker/main.tf +++ b/modules/worker/main.tf @@ -368,7 +368,6 @@ module "autoscale_group" { max_price = var.max_price volume_size = var.volume_size ebs_encryption = var.ebs_encryption - kms_key_arn = var.kms_key_arn volume_type = var.volume_type spot_instance_type = var.spot_instance_type associate_public_ip_address = var.associate_public_ip_address diff --git a/modules/worker/variables.tf b/modules/worker/variables.tf index a1ff824..660afa7 100644 --- a/modules/worker/variables.tf +++ b/modules/worker/variables.tf @@ -410,11 +410,6 @@ variable "ebs_encryption" { description = "Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id." } -variable "kms_key_arn" { - type = string - default = "" - description = "AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set." -} ###Spot variable "spot_enabled" { diff --git a/variables.tf b/variables.tf index fabf41d..58504bc 100644 --- a/variables.tf +++ b/variables.tf @@ -380,12 +380,6 @@ variable "public_access_cidrs" { description = "The list of cidr blocks to access AWS EKS cluster endpoint. Default [`0.0.0.0/0`]" } -variable "resources" { - type = list(string) - default = [] - description = "List of strings with resources to be encrypted. Valid values: secrets" -} - variable "fargate_enabled" { type = bool default = false @@ -404,11 +398,6 @@ variable "number_of_node_groups" { description = "Number of node groups" } -variable "kms_key_arn" { - type = string - default = "" - description = "The ARN of the KMS Key" -} variable "node_security_group_ids" { type = list(string)