Module library

EMR

Terraform module to create AWS EMR resources

Version
Submodules
serverlessstudiovirtual-cluster

Inputs

40 / 74
additional_infooptionalstring

JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore Terraform cannot detect drift from the actual EMR cluster if its value is changed outside Terrafo…

Defaultnull
applicationsoptionallist(string)

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster

Default[]
auto_termination_policyoptionalobject({ idle_timeout = optional(number) })

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates

Defaultnull
autoscaling_iam_role_arnoptionalstring

The ARN of an existing IAM role to use for autoscaling

Defaultnull
autoscaling_iam_role_descriptionoptionalstring

Description of the role

Defaultnull
autoscaling_iam_role_nameoptionalstring

Name to use on IAM role created

Defaultnull
bootstrap_actionoptionallist(object({ args = optional(list(string)) name = string path = string }))

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes

Defaultnull
configurationsoptionalstring

List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration

Defaultnull
configurations_jsonoptionalstring

JSON string for supplying list of configurations for the EMR cluster

Defaultnull
core_instance_fleetoptionalobject({ instance_type_configs = optional(list(object({ bid_price = optional(str…

Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `core_instance_group` configuration blocks are set

Defaultnull
core_instance_groupoptionalobject({ autoscaling_policy = optional(string) bid_price = optional(string) ebs_…

Configuration block to use an [Instance Group] for the core node type

Defaultnull
createoptionalbool

Controls if resources should be created (affects nearly all resources)

Defaulttrue
create_autoscaling_iam_roleoptionalbool

Determines whether the autoscaling IAM role should be created

Defaulttrue
create_iam_instance_profileoptionalbool

Determines whether the EC2 IAM role/instance profile should be created

Defaulttrue
create_managed_security_groupsoptionalbool

Determines whether managed security groups are created

Defaulttrue
create_security_configurationoptionalbool

Determines whether a security configuration is created

Defaultfalse
create_service_iam_roleoptionalbool

Determines whether the service IAM role should be created

Defaulttrue
custom_ami_idoptionalstring

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later

Defaultnull
ebs_root_volume_sizeoptionalnumber

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

Defaultnull
ec2_attributesoptionalobject({ additional_master_security_groups = optional(string) additional_slave_s…

Attributes for the EC2 instances running the job flow

Defaultnull
iam_instance_profile_descriptionoptionalstring

Description of the EC2 IAM role/instance profile

Defaultnull
iam_instance_profile_nameoptionalstring

Name to use on EC2 IAM role/instance profile created

Defaultnull
iam_instance_profile_policiesoptionalmap(string)

Map of IAM policies to attach to the EC2 IAM role/instance profile

Default{…}
iam_instance_profile_role_arnoptionalstring

The ARN of an existing IAM role to use if passing in a custom instance profile and creating a service role

Defaultnull
iam_role_pathoptionalstring

IAM role path

Defaultnull
iam_role_permissions_boundaryoptionalstring

ARN of the policy that is used to set the permissions boundary for the IAM role

Defaultnull
iam_role_tagsoptionalmap(string)

A map of additional tags to add to the IAM role created

Default{}
iam_role_use_name_prefixoptionalbool

Determines whether the IAM role name is used as a prefix

Defaulttrue
is_private_clusteroptionalbool

Identifies whether the cluster is created in a private subnet

Defaulttrue
keep_job_flow_alive_when_no_stepsoptionalbool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

Defaultnull
kerberos_attributesoptionalobject({ ad_domain_join_password = optional(string) ad_domain_join_user = option…

Kerberos configuration for the cluster

Defaultnull
list_steps_statesoptionallist(string)

List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps

Default[]
log_encryption_kms_key_idoptionalstring

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0

Defaultnull
log_urioptionalstring

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created

Defaultnull
managed_scaling_policyoptionalobject({ maximum_capacity_units = number maximum_core_capacity_units = optional(…

Compute limit configuration for a [Managed Scaling Policy](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-managed-scaling.html)

Defaultnull
managed_security_group_nameoptionalstring

Name to use on manged security group created. Note - `-master`, `-slave`, and `-service` will be appended to this name to distinguish

Defaultnull
managed_security_group_tagsoptionalmap(string)

A map of additional tags to add to the security group created

Default{}
managed_security_group_use_name_prefixoptionalbool

Determines whether the security group name (`security_group_name`) is used as a prefix

Defaulttrue
master_instance_fleetoptionalobject({ instance_type_configs = optional(list(object({ bid_price = optional(str…

Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `master_instance_group` configuration blocks are set

Defaultnull
master_instance_groupoptionalobject({ bid_price = optional(string) ebs_config = optional(list(object({ iops =…

Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master)

Defaultnull

All 74 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 34 are in the source.

Outputs

25
autoscaling_iam_role_arn

Autoscaling IAM role ARN

autoscaling_iam_role_name

Autoscaling IAM role name

autoscaling_iam_role_unique_id

Stable and unique string identifying the autoscaling IAM role

cluster_arn

The ARN of the cluster

cluster_core_instance_group_id

Core node type Instance Group ID, if using Instance Group for this node type

cluster_id

The ID of the cluster

cluster_master_instance_group_id

Master node type Instance Group ID, if using Instance Group for this node type

cluster_master_public_dns

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name

iam_instance_profile_arn

ARN assigned by AWS to the instance profile

iam_instance_profile_iam_role_arn

Instance profile IAM role ARN

iam_instance_profile_iam_role_name

Instance profile IAM role name

iam_instance_profile_iam_role_unique_id

Stable and unique string identifying the instance profile IAM role

iam_instance_profile_id

Instance profile's ID

iam_instance_profile_unique

Stable and unique string identifying the IAM instance profile

managed_master_security_group_arn

Amazon Resource Name (ARN) of the managed master security group

managed_master_security_group_id

ID of the managed master security group

managed_service_access_security_group_arn

Amazon Resource Name (ARN) of the managed service access security group

managed_service_access_security_group_id

ID of the managed service access security group

managed_slave_security_group_arn

Amazon Resource Name (ARN) of the managed slave security group

managed_slave_security_group_id

ID of the managed slave security group

security_configuration_id

The ID of the security configuration

security_configuration_name

The name of the security configuration

service_iam_role_arn

Service IAM role ARN

service_iam_role_name

Service IAM role name

service_iam_role_unique_id

Stable and unique string identifying the service IAM role

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.