From ca46bf0cbbc31b5a36e02c17fa2c50e427dadbf0 Mon Sep 17 00:00:00 2001 From: Cameron Boulton Date: Thu, 18 May 2023 11:54:51 -0700 Subject: [PATCH 1/2] Add EMR security_configuration --- aws_datalake/modules/emr/main.tf | 5 +++-- aws_datalake/modules/emr/variables.tf | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/aws_datalake/modules/emr/main.tf b/aws_datalake/modules/emr/main.tf index 1ca3333..90147cd 100644 --- a/aws_datalake/modules/emr/main.tf +++ b/aws_datalake/modules/emr/main.tf @@ -14,8 +14,9 @@ resource "aws_emr_cluster" "segment_data_lake_emr_cluster" { instance_profile = var.iam_emr_instance_profile } - service_role = var.iam_emr_service_role - autoscaling_role = var.iam_emr_autoscaling_role + service_role = var.iam_emr_service_role + autoscaling_role = var.iam_emr_autoscaling_role + security_configuration = var.security_configuration master_instance_group { instance_type = var.master_instance_type diff --git a/aws_datalake/modules/emr/variables.tf b/aws_datalake/modules/emr/variables.tf index 5a8f9cb..49ff7c8 100644 --- a/aws_datalake/modules/emr/variables.tf +++ b/aws_datalake/modules/emr/variables.tf @@ -20,6 +20,12 @@ variable "slave_security_group" { default = "" } +variable "security_configuration" { + description = "Name of the EMR security configuration for options like Encryption, IMDS, etc." + type = string + default = "" +} + variable "tags" { description = "A map of tags to add to all resources. A vendor=segment tag will be added automatically (which is also used by the IAM policy to provide Segment access to submit jobs)." type = map(string) From f17b91083cfdddf61778483e743e294a049bf1ad Mon Sep 17 00:00:00 2001 From: Cameron Boulton Date: Thu, 18 May 2023 12:02:22 -0700 Subject: [PATCH 2/2] Fix indentation --- aws_datalake/modules/emr/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws_datalake/modules/emr/main.tf b/aws_datalake/modules/emr/main.tf index 90147cd..1b0c581 100644 --- a/aws_datalake/modules/emr/main.tf +++ b/aws_datalake/modules/emr/main.tf @@ -16,7 +16,7 @@ resource "aws_emr_cluster" "segment_data_lake_emr_cluster" { service_role = var.iam_emr_service_role autoscaling_role = var.iam_emr_autoscaling_role - security_configuration = var.security_configuration + security_configuration = var.security_configuration master_instance_group { instance_type = var.master_instance_type