Skip to content

Commit 2e7045e

Browse files
feat: Support interactive configuration block for EMR serverless application (#27)
Co-authored-by: Bryant Biggs <[email protected]>
1 parent 90689fd commit 2e7045e

File tree

21 files changed

+47
-27
lines changed

21 files changed

+47
-27
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
330330
| Name | Version |
331331
|------|---------|
332332
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
333-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
333+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
334334

335335
## Providers
336336

337337
| Name | Version |
338338
|------|---------|
339-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
339+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
340340

341341
## Modules
342342

examples/private-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Note that this example may create resources which will incur monetary charges on
2828
| Name | Version |
2929
|------|---------|
3030
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
31-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
31+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
3232

3333
## Providers
3434

3535
| Name | Version |
3636
|------|---------|
37-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
37+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
3838

3939
## Modules
4040

examples/private-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

examples/public-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on
2626
| Name | Version |
2727
|------|---------|
2828
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
29-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
29+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
3030

3131
## Providers
3232

3333
| Name | Version |
3434
|------|---------|
35-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
35+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
3636

3737
## Modules
3838

examples/public-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

examples/serverless-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on
2626
| Name | Version |
2727
|------|---------|
2828
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
29-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
29+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
3030

3131
## Providers
3232

3333
| Name | Version |
3434
|------|---------|
35-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
35+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
3636

3737
## Modules
3838

examples/serverless-cluster/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ module "emr_serverless_spark" {
7474
}
7575
}
7676

77+
interactive_configuration = {
78+
livy_endpoint_enabled = true
79+
studio_enabled = true
80+
}
81+
7782
tags = local.tags
7883
}
7984

examples/serverless-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

examples/studio/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ $ terraform apply
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
3232

3333
## Modules
3434

examples/studio/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

examples/virtual-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ aws emr-containers list-virtual-clusters --region us-west-2 --states ARRESTED \
4545
| Name | Version |
4646
|------|---------|
4747
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
48-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
48+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
4949
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.17 |
5050
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.0 |
5151
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.7 |
@@ -54,7 +54,7 @@ aws emr-containers list-virtual-clusters --region us-west-2 --states ARRESTED \
5454

5555
| Name | Version |
5656
|------|---------|
57-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
57+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
5858
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.0 |
5959
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.7 |
6060

examples/virtual-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
kubernetes = {
1010
source = "hashicorp/kubernetes"

modules/serverless/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
134134
| Name | Version |
135135
|------|---------|
136136
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
137-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
137+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
138138

139139
## Providers
140140

141141
| Name | Version |
142142
|------|---------|
143-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
143+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
144144

145145
## Modules
146146

@@ -167,6 +167,7 @@ No modules.
167167
| <a name="input_create_security_group"></a> [create\_security\_group](#input\_create\_security\_group) | Determines whether the security group is created | `bool` | `true` | no |
168168
| <a name="input_image_configuration"></a> [image\_configuration](#input\_image\_configuration) | The image configuration applied to all worker types | `any` | `{}` | no |
169169
| <a name="input_initial_capacity"></a> [initial\_capacity](#input\_initial\_capacity) | The capacity to initialize when the application is created | `any` | `{}` | no |
170+
| <a name="input_interactive_configuration"></a> [interactive\_configuration](#input\_interactive\_configuration) | Enables the interactive use cases to use when running an application | `any` | `{}` | no |
170171
| <a name="input_maximum_capacity"></a> [maximum\_capacity](#input\_maximum\_capacity) | The maximum capacity to allocate when the application is created. This is cumulative across all workers at any given point in time, not just when an application is created. No new resources will be created once any one of the defined limits is hit | `any` | `{}` | no |
171172
| <a name="input_name"></a> [name](#input\_name) | The name of the application | `string` | `""` | no |
172173
| <a name="input_network_configuration"></a> [network\_configuration](#input\_network\_configuration) | The network configuration for customer VPC connectivity | `any` | `{}` | no |

modules/serverless/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ resource "aws_emrserverless_application" "this" {
6262
}
6363
}
6464

65+
dynamic "interactive_configuration" {
66+
for_each = length(var.interactive_configuration) > 0 ? [var.interactive_configuration] : []
67+
content {
68+
livy_endpoint_enabled = try(interactive_configuration.value.livy_endpoint_enabled, null)
69+
studio_enabled = try(interactive_configuration.value.studio_enabled, null)
70+
}
71+
}
72+
6573
dynamic "maximum_capacity" {
6674
for_each = length(var.maximum_capacity) > 0 ? [var.maximum_capacity] : []
6775

modules/serverless/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ variable "initial_capacity" {
4444
default = {}
4545
}
4646

47+
variable "interactive_configuration" {
48+
description = "Enables the interactive use cases to use when running an application"
49+
type = any
50+
default = {}
51+
}
52+
4753
variable "maximum_capacity" {
4854
description = "The maximum capacity to allocate when the application is created. This is cumulative across all workers at any given point in time, not just when an application is created. No new resources will be created once any one of the defined limits is hit"
4955
type = any

modules/serverless/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

modules/studio/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
6868
| Name | Version |
6969
|------|---------|
7070
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
71-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
71+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
7272

7373
## Providers
7474

7575
| Name | Version |
7676
|------|---------|
77-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
77+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
7878

7979
## Modules
8080

modules/studio/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

modules/virtual-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
8282
| Name | Version |
8383
|------|---------|
8484
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
85-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.44 |
85+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
8686
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.10 |
8787

8888
## Providers
8989

9090
| Name | Version |
9191
|------|---------|
92-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.44 |
92+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
9393
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 2.10 |
9494

9595
## Modules

modules/virtual-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
kubernetes = {
1010
source = "hashicorp/kubernetes"

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.44"
7+
version = ">= 5.59"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)