UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

824 lines (823 loc) • 40.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/elastic-mapreduce/) for more information. * * To configure [Instance Groups](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for [task nodes](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-task), see the `aws.emr.InstanceGroup` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const cluster = new aws.emr.Cluster("cluster", { * name: "emr-test-arn", * releaseLabel: "emr-4.6.0", * applications: ["Spark"], * additionalInfo: `{ * \\"instanceAwsClientConfiguration\\": { * \\"proxyPort\\": 8099, * \\"proxyHost\\": \\"myproxy.example.com\\" * } * } * `, * terminationProtection: false, * keepJobFlowAliveWhenNoSteps: true, * ec2Attributes: { * subnetId: main.id, * emrManagedMasterSecurityGroup: sg.id, * emrManagedSlaveSecurityGroup: sg.id, * instanceProfile: emrProfile.arn, * }, * masterInstanceGroup: { * instanceType: "m4.large", * }, * coreInstanceGroup: { * instanceType: "c4.large", * instanceCount: 1, * ebsConfigs: [{ * size: 40, * type: "gp2", * volumesPerInstance: 1, * }], * bidPrice: "0.30", * autoscalingPolicy: `{ * \\"Constraints\\": { * \\"MinCapacity\\": 1, * \\"MaxCapacity\\": 2 * }, * \\"Rules\\": [ * { * \\"Name\\": \\"ScaleOutMemoryPercentage\\", * \\"Description\\": \\"Scale out if YARNMemoryAvailablePercentage is less than 15\\", * \\"Action\\": { * \\"SimpleScalingPolicyConfiguration\\": { * \\"AdjustmentType\\": \\"CHANGE_IN_CAPACITY\\", * \\"ScalingAdjustment\\": 1, * \\"CoolDown\\": 300 * } * }, * \\"Trigger\\": { * \\"CloudWatchAlarmDefinition\\": { * \\"ComparisonOperator\\": \\"LESS_THAN\\", * \\"EvaluationPeriods\\": 1, * \\"MetricName\\": \\"YARNMemoryAvailablePercentage\\", * \\"Namespace\\": \\"AWS/ElasticMapReduce\\", * \\"Period\\": 300, * \\"Statistic\\": \\"AVERAGE\\", * \\"Threshold\\": 15.0, * \\"Unit\\": \\"PERCENT\\" * } * } * } * ] * } * `, * }, * ebsRootVolumeSize: 100, * tags: { * role: "rolename", * env: "env", * }, * bootstrapActions: [{ * path: "s3://elasticmapreduce/bootstrap-actions/run-if", * name: "runif", * args: [ * "instance.isMaster=true", * "echo running on master node", * ], * }], * configurationsJson: ` [ * { * \\"Classification\\": \\"hadoop-env\\", * \\"Configurations\\": [ * { * \\"Classification\\": \\"export\\", * \\"Properties\\": { * \\"JAVA_HOME\\": \\"/usr/lib/jvm/java-1.8.0\\" * } * } * ], * \\"Properties\\": {} * }, * { * \\"Classification\\": \\"spark-env\\", * \\"Configurations\\": [ * { * \\"Classification\\": \\"export\\", * \\"Properties\\": { * \\"JAVA_HOME\\": \\"/usr/lib/jvm/java-1.8.0\\" * } * } * ], * \\"Properties\\": {} * } * ] * `, * serviceRole: iamEmrServiceRole.arn, * }); * ``` * * The `aws.emr.Cluster` resource typically requires two IAM roles, one for the EMR Cluster to use as a service role, and another is assigned to every EC2 instance in a cluster and each application process that runs on a cluster assumes this role for permissions to interact with other AWS services. An additional role, the Auto Scaling role, is required if your cluster uses automatic scaling in Amazon EMR. * * The default AWS managed EMR service role is called `EMR_DefaultRole` with Amazon managed policy `AmazonEMRServicePolicy_v2` attached. The name of default instance profile role is `EMR_EC2_DefaultRole` with default managed policy `AmazonElasticMapReduceforEC2Role` attached, but it is on the path to deprecation and will not be replaced with another default managed policy. You'll need to create and specify an instance profile to replace the deprecated role and default policy. See the [Configure IAM service roles for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles.html) guide for more information on these IAM roles. There is also a fully-bootable example Pulumi configuration at the bottom of this page. * * ### Instance Fleet * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.emr.Cluster("example", { * masterInstanceFleet: { * instanceTypeConfigs: [{ * instanceType: "m4.xlarge", * }], * targetOnDemandCapacity: 1, * }, * coreInstanceFleet: { * instanceTypeConfigs: [ * { * bidPriceAsPercentageOfOnDemandPrice: 80, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m3.xlarge", * weightedCapacity: 1, * }, * { * bidPriceAsPercentageOfOnDemandPrice: 100, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m4.xlarge", * weightedCapacity: 1, * }, * { * bidPriceAsPercentageOfOnDemandPrice: 100, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m4.2xlarge", * weightedCapacity: 2, * }, * ], * launchSpecifications: { * spotSpecifications: [{ * allocationStrategy: "capacity-optimized", * blockDurationMinutes: 0, * timeoutAction: "SWITCH_TO_ON_DEMAND", * timeoutDurationMinutes: 10, * }], * }, * name: "core fleet", * targetOnDemandCapacity: 2, * targetSpotCapacity: 2, * }, * }); * const task = new aws.emr.InstanceFleet("task", { * clusterId: example.id, * instanceTypeConfigs: [ * { * bidPriceAsPercentageOfOnDemandPrice: 100, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m4.xlarge", * weightedCapacity: 1, * }, * { * bidPriceAsPercentageOfOnDemandPrice: 100, * ebsConfigs: [{ * size: 100, * type: "gp2", * volumesPerInstance: 1, * }], * instanceType: "m4.2xlarge", * weightedCapacity: 2, * }, * ], * launchSpecifications: { * spotSpecifications: [{ * allocationStrategy: "capacity-optimized", * blockDurationMinutes: 0, * timeoutAction: "TERMINATE_CLUSTER", * timeoutDurationMinutes: 10, * }], * }, * name: "task fleet", * targetOnDemandCapacity: 1, * targetSpotCapacity: 1, * }); * ``` * * ### Enable Debug Logging * * [Debug logging in EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-debugging.html) is implemented as a step. It is highly recommended that you utilize the resource options configuration with `ignoreChanges` if other steps are being managed outside of this provider. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.emr.Cluster("example", {steps: [{ * actionOnFailure: "TERMINATE_CLUSTER", * name: "Setup Hadoop Debugging", * hadoopJarStep: { * jar: "command-runner.jar", * args: ["state-pusher-script"], * }, * }]}); * ``` * * ### Multiple Node Master Instance Group * * Available in EMR version 5.23.0 and later, an EMR Cluster can be launched with three master nodes for high availability. Additional information about this functionality and its requirements can be found in the [EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha.html). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * // This configuration is for illustrative purposes and highlights * // only relevant configurations for working with this functionality. * // Map public IP on launch must be enabled for public (Internet accessible) subnets * const example = new aws.ec2.Subnet("example", {mapPublicIpOnLaunch: true}); * const exampleCluster = new aws.emr.Cluster("example", { * releaseLabel: "emr-5.24.1", * terminationProtection: true, * ec2Attributes: { * subnetId: example.id, * }, * masterInstanceGroup: { * instanceCount: 3, * }, * coreInstanceGroup: {}, * }); * ``` * * ## Import * * Using `pulumi import`, import EMR clusters using the `id`. For example: * * ```sh * $ pulumi import aws:emr/cluster:Cluster cluster j-123456ABCDEF * ``` * Since the API does not return the actual values for Kerberos configurations, environments with those options set will need to use the `lifecycle` configuration block `ignore_changes` argument available to all Pulumi resources to prevent perpetual differences. For example: */ export declare class Cluster extends pulumi.CustomResource { /** * Get an existing Cluster resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster; /** * Returns true if the given object is an instance of Cluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Cluster; /** * 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 the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider. */ readonly additionalInfo: pulumi.Output<string | undefined>; /** * A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html). */ readonly applications: pulumi.Output<string[] | undefined>; /** * ARN of the cluster. */ readonly arn: pulumi.Output<string>; /** * 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. See Auto Termination Policy Below. */ readonly autoTerminationPolicy: pulumi.Output<outputs.emr.ClusterAutoTerminationPolicy | undefined>; /** * IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group. */ readonly autoscalingRole: pulumi.Output<string | undefined>; /** * Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below. */ readonly bootstrapActions: pulumi.Output<outputs.emr.ClusterBootstrapAction[] | undefined>; readonly clusterState: pulumi.Output<string>; /** * List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information. */ readonly configurations: pulumi.Output<string | undefined>; /** * JSON string for supplying list of configurations for the EMR cluster. * * > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[ * { * \\"Classification\\": \\"hadoop-env\\", * \\"Configurations\\": [ * { * \\"Classification\\": \\"export\\", * \\"Properties\\": { * \\"JAVA_HOME\\": \\"/usr/lib/jvm/java-1.8.0\\" * } * } * ], * \\"Properties\\": {} * } * ] * `}); * ``` */ readonly configurationsJson: pulumi.Output<string | undefined>; /** * 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 `coreInstanceGroup` configuration blocks are set. Detailed below. */ readonly coreInstanceFleet: pulumi.Output<outputs.emr.ClusterCoreInstanceFleet>; /** * 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 [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core). */ readonly coreInstanceGroup: pulumi.Output<outputs.emr.ClusterCoreInstanceGroup>; /** * Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later. */ readonly customAmiId: pulumi.Output<string | undefined>; /** * 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. */ readonly ebsRootVolumeSize: pulumi.Output<number | undefined>; /** * Attributes for the EC2 instances running the job flow. See below. */ readonly ec2Attributes: pulumi.Output<outputs.emr.ClusterEc2Attributes | undefined>; /** * Switch on/off run cluster with no steps or when all steps are complete (default is on) */ readonly keepJobFlowAliveWhenNoSteps: pulumi.Output<boolean>; /** * Kerberos configuration for the cluster. See below. */ readonly kerberosAttributes: pulumi.Output<outputs.emr.ClusterKerberosAttributes | undefined>; /** * List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps */ readonly listStepsStates: pulumi.Output<string[] | undefined>; /** * 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. */ readonly logEncryptionKmsKeyId: pulumi.Output<string | undefined>; /** * S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created. */ readonly logUri: pulumi.Output<string | undefined>; /** * 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 `masterInstanceGroup` configuration blocks are set. Detailed below. */ readonly masterInstanceFleet: pulumi.Output<outputs.emr.ClusterMasterInstanceFleet>; /** * 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). */ readonly masterInstanceGroup: pulumi.Output<outputs.emr.ClusterMasterInstanceGroup>; /** * 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. */ readonly masterPublicDns: pulumi.Output<string>; /** * Name of the job flow. */ readonly name: pulumi.Output<string>; /** * Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch. */ readonly osReleaseLabel: pulumi.Output<string | undefined>; /** * The specified placement group configuration for an Amazon EMR cluster. */ readonly placementGroupConfigs: pulumi.Output<outputs.emr.ClusterPlacementGroupConfig[] | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * Release label for the Amazon EMR release. */ readonly releaseLabel: pulumi.Output<string>; /** * Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized. */ readonly scaleDownBehavior: pulumi.Output<string>; /** * Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater. */ readonly securityConfiguration: pulumi.Output<string | undefined>; /** * IAM role that will be assumed by the Amazon EMR service to access AWS resources. * * The following arguments are optional: */ readonly serviceRole: pulumi.Output<string>; /** * Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1). */ readonly stepConcurrencyLevel: pulumi.Output<number | undefined>; /** * List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider. */ readonly steps: pulumi.Output<outputs.emr.ClusterStep[]>; /** * list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`. */ readonly terminationProtection: pulumi.Output<boolean>; /** * Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`. */ readonly unhealthyNodeReplacement: pulumi.Output<boolean | undefined>; /** * Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`. * * **NOTE:** As per the [Amazon EMR API Reference](https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html#EMR-RunJobFlow-request-VisibleToAllUsers), this argument is no longer supported. Do not set this argument, particularly to `false`, as it would lead to perpetual differences. */ readonly visibleToAllUsers: pulumi.Output<boolean | undefined>; /** * Create a Cluster resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Cluster resources. */ export interface ClusterState { /** * 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 the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider. */ additionalInfo?: pulumi.Input<string>; /** * A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html). */ applications?: pulumi.Input<pulumi.Input<string>[]>; /** * ARN of the cluster. */ arn?: pulumi.Input<string>; /** * 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. See Auto Termination Policy Below. */ autoTerminationPolicy?: pulumi.Input<inputs.emr.ClusterAutoTerminationPolicy>; /** * IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group. */ autoscalingRole?: pulumi.Input<string>; /** * Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below. */ bootstrapActions?: pulumi.Input<pulumi.Input<inputs.emr.ClusterBootstrapAction>[]>; clusterState?: pulumi.Input<string>; /** * List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information. */ configurations?: pulumi.Input<string>; /** * JSON string for supplying list of configurations for the EMR cluster. * * > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[ * { * \\"Classification\\": \\"hadoop-env\\", * \\"Configurations\\": [ * { * \\"Classification\\": \\"export\\", * \\"Properties\\": { * \\"JAVA_HOME\\": \\"/usr/lib/jvm/java-1.8.0\\" * } * } * ], * \\"Properties\\": {} * } * ] * `}); * ``` */ configurationsJson?: pulumi.Input<string>; /** * 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 `coreInstanceGroup` configuration blocks are set. Detailed below. */ coreInstanceFleet?: pulumi.Input<inputs.emr.ClusterCoreInstanceFleet>; /** * 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 [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core). */ coreInstanceGroup?: pulumi.Input<inputs.emr.ClusterCoreInstanceGroup>; /** * Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later. */ customAmiId?: pulumi.Input<string>; /** * 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. */ ebsRootVolumeSize?: pulumi.Input<number>; /** * Attributes for the EC2 instances running the job flow. See below. */ ec2Attributes?: pulumi.Input<inputs.emr.ClusterEc2Attributes>; /** * Switch on/off run cluster with no steps or when all steps are complete (default is on) */ keepJobFlowAliveWhenNoSteps?: pulumi.Input<boolean>; /** * Kerberos configuration for the cluster. See below. */ kerberosAttributes?: pulumi.Input<inputs.emr.ClusterKerberosAttributes>; /** * List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps */ listStepsStates?: pulumi.Input<pulumi.Input<string>[]>; /** * 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. */ logEncryptionKmsKeyId?: pulumi.Input<string>; /** * S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created. */ logUri?: pulumi.Input<string>; /** * 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 `masterInstanceGroup` configuration blocks are set. Detailed below. */ masterInstanceFleet?: pulumi.Input<inputs.emr.ClusterMasterInstanceFleet>; /** * 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). */ masterInstanceGroup?: pulumi.Input<inputs.emr.ClusterMasterInstanceGroup>; /** * 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. */ masterPublicDns?: pulumi.Input<string>; /** * Name of the job flow. */ name?: pulumi.Input<string>; /** * Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch. */ osReleaseLabel?: pulumi.Input<string>; /** * The specified placement group configuration for an Amazon EMR cluster. */ placementGroupConfigs?: pulumi.Input<pulumi.Input<inputs.emr.ClusterPlacementGroupConfig>[]>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * Release label for the Amazon EMR release. */ releaseLabel?: pulumi.Input<string>; /** * Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized. */ scaleDownBehavior?: pulumi.Input<string>; /** * Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater. */ securityConfiguration?: pulumi.Input<string>; /** * IAM role that will be assumed by the Amazon EMR service to access AWS resources. * * The following arguments are optional: */ serviceRole?: pulumi.Input<string>; /** * Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1). */ stepConcurrencyLevel?: pulumi.Input<number>; /** * List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider. */ steps?: pulumi.Input<pulumi.Input<inputs.emr.ClusterStep>[]>; /** * list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`. */ terminationProtection?: pulumi.Input<boolean>; /** * Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`. */ unhealthyNodeReplacement?: pulumi.Input<boolean>; /** * Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`. * * **NOTE:** As per the [Amazon EMR API Reference](https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html#EMR-RunJobFlow-request-VisibleToAllUsers), this argument is no longer supported. Do not set this argument, particularly to `false`, as it would lead to perpetual differences. */ visibleToAllUsers?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a Cluster resource. */ export interface ClusterArgs { /** * 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 the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider. */ additionalInfo?: pulumi.Input<string>; /** * A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html). */ applications?: pulumi.Input<pulumi.Input<string>[]>; /** * 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. See Auto Termination Policy Below. */ autoTerminationPolicy?: pulumi.Input<inputs.emr.ClusterAutoTerminationPolicy>; /** * IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group. */ autoscalingRole?: pulumi.Input<string>; /** * Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below. */ bootstrapActions?: pulumi.Input<pulumi.Input<inputs.emr.ClusterBootstrapAction>[]>; /** * List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information. */ configurations?: pulumi.Input<string>; /** * JSON string for supplying list of configurations for the EMR cluster. * * > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[ * { * \\"Classification\\": \\"hadoop-env\\", * \\"Configurations\\": [ * { * \\"Classification\\": \\"export\\", * \\"Properties\\": { * \\"JAVA_HOME\\": \\"/usr/lib/jvm/java-1.8.0\\" * } * } * ], * \\"Properties\\": {} * } * ] * `}); * ``` */ configurationsJson?: pulumi.Input<string>; /** * 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 `coreInstanceGroup` configuration blocks are set. Detailed below. */ coreInstanceFleet?: pulumi.Input<inputs.emr.ClusterCoreInstanceFleet>; /** * 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 [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core). */ coreInstanceGroup?: pulumi.Input<inputs.emr.ClusterCoreInstanceGroup>; /** * Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later. */ customAmiId?: pulumi.Input<string>; /** * 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. */ ebsRootVolumeSize?: pulumi.Input<number>; /** * Attributes for the EC2 instances running the job flow. See below. */ ec2Attributes?: pulumi.Input<inputs.emr.ClusterEc2Attributes>; /** * Switch on/off run cluster with no steps or when all steps are complete (default is on) */ keepJobFlowAliveWhenNoSteps?: pulumi.Input<boolean>; /** * Kerberos configuration for the cluster. See below. */ kerberosAttributes?: pulumi.Input<inputs.emr.ClusterKerberosAttributes>; /** * List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps */ listStepsStates?: pulumi.Input<pulumi.Input<string>[]>; /** * 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. */ logEncryptionKmsKeyId?: pulumi.Input<string>; /** * S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created. */ logUri?: pulumi.Input<string>; /** * 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 `masterInstanceGroup` configuration blocks are set. Detailed below. */ masterInstanceFleet?: pulumi.Input<inputs.emr.ClusterMasterInstanceFleet>; /** * 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). */ masterInstanceGroup?: pulumi.Input<inputs.emr.ClusterMasterInstanceGroup>; /** * Name of the job flow. */ name?: pulumi.Input<string>; /** * Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch. */ osReleaseLabel?: pulumi.Input<string>; /** * The specified placement group configuration for an Amazon EMR cluster. */ placementGroupConfigs?: pulumi.Input<pulumi.Input<inputs.emr.ClusterPlacementGroupConfig>[]>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * Release label for the Amazon EMR release. */ releaseLabel: pulumi.Input<string>; /** * Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized. */ scaleDownBehavior?: pulumi.Input<string>; /** * Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater. */ securityConfiguration?: pulumi.Input<string>; /** * IAM role that will be assumed by the Amazon EMR service to access AWS resources. * * The following arguments are optional: */ serviceRole: pulumi.Input<string>; /** * Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1). */ stepConcurrencyLevel?: pulumi.Input<number>; /** * List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider. */ steps?: pulumi.Input<pulumi.Input<inputs.emr.ClusterStep>[]>; /** * list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`. */ terminationProtection?: pulumi.Input<boolean>; /** * Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`. */ unhealthyNodeReplacement?: pulumi.Input<boolean>; /** * Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`. * * **NOTE:** As per the [Amazon EMR API Reference](https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html#EMR-RunJobFlow-request-VisibleToAllUsers), this argument is no longer supported. Do not set this argument, particularly to `false`, as it would lead to perpetual differences. */ visibleToAllUsers?: pulumi.Input<boolean>; }