From a54de689fd58b329296a1453269163149efdbe01 Mon Sep 17 00:00:00 2001 From: calvin-barker <54291801+calvin-barker@users.noreply.github.com> Date: Tue, 1 Sep 2020 00:44:41 -0400 Subject: [PATCH] Add support for step_concurrency_level (#25) * Adding step concurrency level support * Dropping rogue " * dropping potentially confusing 'default is 1' * Updated README.md Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com> --- README.md | 1 + docs/terraform.md | 1 + main.tf | 1 + variables.tf | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 9f0df88..1ddfcbb 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ Available targets: | slave\_allowed\_cidr\_blocks | List of CIDR blocks to be allowed to access the slave instances | `list(string)` | `[]` | no | | slave\_allowed\_security\_groups | List of security groups to be allowed to connect to the slave instances | `list(string)` | `[]` | no | | stage | Stage (e.g. `prod`, `dev`, `staging`) | `string` | `""` | no | +| step\_concurrency\_level | The number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release\_label 5.28.0 or greater. | `number` | `null` | no | | subnet\_id | VPC subnet ID where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC | `string` | n/a | yes | | subnet\_type | Type of VPC subnet ID where you want the job flow to launch. Supported values are `private` or `public` | `string` | `"private"` | no | | tags | Additional tags (\_e.g.\_ { BusinessUnit : ABC }) | `map(string)` | `{}` | no | diff --git a/docs/terraform.md b/docs/terraform.md index b37202e..355be80 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -66,6 +66,7 @@ | slave\_allowed\_cidr\_blocks | List of CIDR blocks to be allowed to access the slave instances | `list(string)` | `[]` | no | | slave\_allowed\_security\_groups | List of security groups to be allowed to connect to the slave instances | `list(string)` | `[]` | no | | stage | Stage (e.g. `prod`, `dev`, `staging`) | `string` | `""` | no | +| step\_concurrency\_level | The number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release\_label 5.28.0 or greater. | `number` | `null` | no | | subnet\_id | VPC subnet ID where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC | `string` | n/a | yes | | subnet\_type | Type of VPC subnet ID where you want the job flow to launch. Supported values are `private` or `public` | `string` | `"private"` | no | | tags | Additional tags (\_e.g.\_ { BusinessUnit : ABC }) | `map(string)` | `{}` | no | diff --git a/main.tf b/main.tf index c8a1423..e96368c 100644 --- a/main.tf +++ b/main.tf @@ -392,6 +392,7 @@ resource "aws_emr_cluster" "default" { termination_protection = var.termination_protection keep_job_flow_alive_when_no_steps = var.keep_job_flow_alive_when_no_steps + step_concurrency_level = var.step_concurrency_level ebs_root_volume_size = var.ebs_root_volume_size custom_ami_id = var.custom_ami_id visible_to_all_users = var.visible_to_all_users diff --git a/variables.tf b/variables.tf index f069c00..28dc0c9 100644 --- a/variables.tf +++ b/variables.tf @@ -92,6 +92,12 @@ variable "keep_job_flow_alive_when_no_steps" { default = true } +variable "step_concurrency_level" { + type = number + description = "The number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater." + default = null +} + variable "ebs_root_volume_size" { type = number description = "Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later"