hashicorp/terraform-provider-aws

[EMR on EKS] aws_emrcontainers_job_template: add support for job_template_data.parameter_configuration

Open

#46,502 opened on Feb 16, 2026

 (3 comments) (2 reactions) (0 assignees)Go (10,310 forks)github user discovery
enhancementgood first issueservice/emrcontainers

Repository metrics

Stars
 (11,045 stars)
PR merge metrics
 (PR metrics pending)

Description

Description

Summary

Please add support for the parameter_configuration field on aws_emrcontainers_job_template.job_template_data, enabling Job Template parameters for Amazon EMR on EKS directly from Terraform. The AWS API exposes parameterConfiguration on JobTemplateData, but the Terraform resource does not currently model it. This blocks the documented pattern of using ${ParamName} placeholders in the template and providing values at StartJobRun via jobTemplateParameters.

Current behavior

  • The Terraform Registry docs for aws_emrcontainers_job_template list execution_role_arn, release_label, job_driver, configuration_overrides, and job_tags, but not parameter_configuration. Templates created via Terraform therefore contain no parameters and StartJobRun with --job-template-parameters fails with “Parameter not defined … Valid parameters are []”.
  • The AWS EMR on EKS docs show defining parameters in parameterConfiguration and referencing them as ${ParameterName}; callers then pass jobTemplateParameters at submit time. The AWS SDK model (JobTemplateData) exposes getters/setters for ParameterConfiguration.

Why this is important

EMR on EKS Job Templates are immutable and serve as contracts/guardrails. Without parameter_configuration, users cannot keep a stable template while varying run‑time values (entry point URI, run date, Spark sizing, etc.). Today teams must either:

  • skip Job Templates and call StartJobRun without a template (losing guardrails), or
  • create templates outside Terraform (CLI/API) and stitch IDs back in (SSM/variables), increasing operational complexity.

Proposed solution (resource schema)

Add parameter_configuration under job_template_data

Affected Resource(s) or Data Source(s)

  • aws_emrcontainers_job_template

Potential Terraform Configuration

resource "aws_emrcontainers_job_template" "example" {
  name = "my-template"

  job_template_data {
    execution_role_arn = aws_iam_role.exec.arn
    release_label      = "emr-7.2.0-latest"

    job_driver {
      spark_submit_job_driver {
        # Placeholders that correspond to parameter_configuration keys
        entry_point            = "${EntryPointUri}"
        entry_point_arguments  = ["${RunDate}"]
        spark_submit_parameters = "--class ${MainClass} --driver-memory ${DriverMemory}"
      }
    }

    configuration_overrides {
      monitoring_configuration {
        persistent_app_ui = "ENABLED"
        cloud_watch_monitoring_configuration {
          log_group_name         = "/emr-on-eks/myapp"
          log_stream_name_prefix = "spark"
        }
      }
    }

    # NEW: parameterized template definitions
    parameter_configuration = {
      EntryPointUri = { type = "STRING" }
      RunDate       = { type = "STRING" }
      MainClass     = { type = "STRING", default_value = "com.example.Main" }
      DriverMemory  = { type = "STRING", default_value = "4G" }
    }

    job_tags = { app = "myapp" }
  }
}

References

No response

Would you like to implement the enhancement?

No

Contributor guide