Skip to content

Commit

Permalink
Merge pull request #33 from mithun008/main
Browse files Browse the repository at this point in the history
feat: Add property to pass EMR operatorExecutionRoleArn
  • Loading branch information
askulkarni2 authored Apr 22, 2024
2 parents c4a4d4a + 8711ca5 commit 66551d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions emr-flink-operator.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
locals {
emr_flink_operator_name = "flink-kubernetes-operator"
emr_release_label = "emr-6.13.0-flink-k8s-operator-latest"
emr_release_label = "emr-7.1.0-flink-k8s-operator-latest"

emr_flink_operator_values = yamlencode(merge(
yamldecode(<<EOT
# Move ths Part to SET Section
emrContainers:
awsRegion: ${local.region}
emrReleaseLabel: ${local.emr_release_label}
EOT
),
try(yamldecode(var.emr_flink_operator_helm_config.values[0]), {})
Expand All @@ -20,7 +21,7 @@ resource "helm_release" "emr_flink_operator" {
name = try(var.emr_flink_operator_helm_config["name"], local.emr_flink_operator_name)
repository = try(var.emr_flink_operator_helm_config["repository"], "oci://${local.account_region_map[local.region]}.dkr.ecr.${local.region}.amazonaws.com")
chart = try(var.emr_flink_operator_helm_config["chart"], local.emr_flink_operator_name)
version = try(var.emr_flink_operator_helm_config["version"], "6.13.0")
version = try(var.emr_flink_operator_helm_config["version"], "7.1.0")
timeout = try(var.emr_flink_operator_helm_config["timeout"], 300)
values = try(var.emr_flink_operator_helm_config["values"], [local.emr_flink_operator_values])
create_namespace = try(var.emr_flink_operator_helm_config["create_namespace"], true)
Expand Down Expand Up @@ -49,6 +50,11 @@ resource "helm_release" "emr_flink_operator" {
dependency_update = try(var.emr_flink_operator_helm_config["dependency_update"], false)
replace = try(var.emr_flink_operator_helm_config["replace"], false)

set {
name = "emrContainers.operatorExecutionRoleArn"
value = try(var.emr_flink_operator_helm_config["operatorExecutionRoleArn"], null)
}

postrender {
binary_path = try(var.emr_flink_operator_helm_config["postrender"], "")
}
Expand Down

0 comments on commit 66551d0

Please sign in to comment.